This content has been marked as final.
Show 3 replies
-
1. Re: selectOneMenu & Richfaces help please?
sergeysmirnov Jun 10, 2008 1:20 PM (in response to allenr98)Just do what you want. I.e. add a4j:support with event="onchange" to the first selectOneMenu and point to to the second selectOneMenu's id with reRender attribute.
If you have a validation rules on the other fields at the same form, add ajaxSingle="true" attribute to the a4j:support to prevent those unnecessary validations fired.
In case you still have a problem or/and misunderstanding, post the code snippet of the current page code you have problem with. -
2. Re: selectOneMenu & Richfaces help please?
allenr98 Jun 10, 2008 1:30 PM (in response to allenr98)Thanks, Sergey -- that should head me in the right direction. I'll post back either if I have trouble, or I'll post my solution.
-- Rob -
3. Re: selectOneMenu & Richfaces help please?
allenr98 Jun 10, 2008 6:46 PM (in response to allenr98)That worked great!
The tag I added to my selectOneMenu item was:<a4j:support event="onchange" reRender="toGeneralist" ajaxSingle="true"/>
...where the selectOneMenu I wanted to affect had an id="toGeneralist".
One little thing I had to work out on my own was that within the bean method that generates the list for my "toGeneralist" pull-down menu, in order to modify the query with the selected item from the first menu I had to inject the seam component that was the target of the selected value.
In other words, my selectOneMenu was:<h:selectOneMenu id="projectDistrict" value="#{esrsList.esrs.projectDistrict}" required="false">
So in the bean method I needed a declaration:@In EsrsList esrsList;
I could then reference the component as a parameter to my query as follows:query.setParameter("district", "#{esrsList.esrs.projectDistrict}");
That's all standard Seam stuff, though. The RichFaces thing worked perfectly.
Thanks very much (and I hope this thread helps some other n3wbi3 down the road)!
-- Rob