Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX with JSF issues on selectone menu

 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

<h:selectOneMenu id="disp" binding="#{myBean.firstMenu}" valueChangeListener="#{changeBean.changesecondMenu}">
<f:selectItems value="#{changeBean.firstMenuItems}" />
<a4j:support event="onchange" immediate="yes" reRender="selids" ajaxSingle="true"></a4j:support>
</h:selectOneMenu>


<h:selectOneMenu id="selids" binding="#{changeBean.secondMenu}">
<f:selectItems value="#{changeBean.secoondMenuItems}" />
</h:selectOneMenu>

I have two dependent drop downs, my first menu contains all the cities on change I need to get counties.

If i use directly onChange="Submit" it is working fine but my entire page is getting refreshed.

When I use ajax my valueListener method is not getting called.

Can somebody explain me what can be the issue, I am very new to jsf and ajax. Please help .

Thanks in advance
Kalam

 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it resolved need to put between <a4j:region>

Thanks
kalam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic