-
1. Re: Changing selected item in a selectOneMenu using AJAX?
sergeysmirnov Jul 31, 2007 1:22 PM (in response to igx89)Because JSF works exactly like that according to the JSF spec.
Spec says that a JSF component renderer is responsible for using the submitted value rather than the value from the model when the same view is rendered again (that is always true for Ajax responses).
The general solution is DO NOT process the submitted value.
You did not send the snippet with Ajax component. Post it and we will find the way. -
2. Re: Changing selected item in a selectOneMenu using AJAX?
igx89 Jul 31, 2007 1:38 PM (in response to igx89)So components update the field bound to their value attribute on an AJAX request, but don't read that field after calling the action method and before performing the render? They just assume the bean never changes it? Why doesn't form submit processing (non-AJAX) not suffer from that issue then?
I took that code from the a4j-dropDownBoxes demo at http://labs.jboss.com/jbossajax4jsf/demo/index.html. To get an idea of what I'm trying to do, add the following line to the end of the else clause in the changeOptions method in Bean.java:
property2 = "500";
Thanks!