If you have integrated dojo and JSF in the way described here in the authors' first method of integration, the you probably ran into a problem of how to copy the values back to the hidden field -- if you are trying to implement an auto-save feature. In other words, if you want to allow a user to not have to click a link/button in order to save their changes then you must find some other client event to tap into. I believe the authors of that article I referred to used an example for their first method which simply used onclick of a button to save back a value.
For the purposes of my auto-save feature, I went with something much more piggy: onkeyup for the dojo field itself. So with every keystroke I copy back the value to the hidden field. This fix was quick, and it really is not that slow.
For a more efficient implementation, you could program javascript to wait 5 seconds after every keystroke, then check to see if the value has changed, but I wonder if the simple copy would be more efficient than all that...probably!
This site promotes and supports the development and deployment of JSF, Oracle ADF applications, and other web development topics. If you have interesting facts to share about any of these or any related technologies, please feel free to post a comment.
Showing posts with label Dojo. Show all posts
Showing posts with label Dojo. Show all posts
Thursday, March 25, 2010
Wednesday, June 17, 2009
f:verbatim's affects on af:inputText
Did you know if f:verbatim is a parent of af:inputText that the af:inputText will ignore changes made by the end-user to its data??? That one drove me a little nuts. I am trying to integrate Dojo with ADF is why I ran into such a scenario.
Subscribe to:
Posts (Atom)