• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to refresh selectOneMenu  RSS feed

 
Max Ji
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have two selectOneMenus A and B. A needs to be populated based on the user selection in B. When the user changes the selection in B, the choices in A need to change accordingly. Is there a way to do this?
(The choices in A and B are read from a database.) Thank you.
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Ajax.
 
Alim Atar
Ranch Hand
Posts: 102
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

For your requirement you can use reRender of a4j:support.
For example

<h:selectOneMenu id="A" >
<a4j:support action="onchagne" reRender="B"></a4j:support>
...</h:selectOneMenu>
<h:selectOneMenu id="B" >...</>

This will refresh once you change.More over you can use a4j:region in case if you don't want to submit complete form.
Hope this will solve your problem.
Regards,
-Alim
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!