This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: AJAX with JSF issues on selectone menu
 
It's not a secret anymore!