*
The moose likes JSF and the fly likes AJAX with JSF issues on selectone menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "AJAX with JSF issues on selectone menu" Watch "AJAX with JSF issues on selectone menu" New topic
Author

AJAX with JSF issues on selectone menu

chandra chatterjee
Greenhorn

Joined: May 13, 2009
Posts: 18
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

Joined: May 13, 2009
Posts: 18
I got it resolved need to put between <a4j:region>

Thanks
kalam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AJAX with JSF issues on selectone menu