Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes JSF and the fly likes jafvalidations-ajax problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jafvalidations-ajax problem" Watch "jafvalidations-ajax problem" New topic

jafvalidations-ajax problem

Naresh Gunda
Ranch Hand

Joined: Oct 15, 2005
Posts: 163

I have a simple jsf example, It has few issues with ajax calls.

When we use <a4j: support> with ajaxSingle="true" only one component is being processed, because of this, values entered in other components are getting erased, as these values are not populated in to the formbean.

When we dont use ajaxSingle="true" immediate="true", the whole form is being submitted and validate methods are being called, for all the fields which are empty, error messages are getting displayed.

Can you please suggest me a solution.
Naresh Gunda
Ranch Hand

Joined: Oct 15, 2005
Posts: 163
I am using JSF with webflow and ajax.
Vaibhav Mittal

Joined: Jun 11, 2008
Posts: 23
Use valueChangeListener attribute for <h:selectOneMenu> with immediate="true" and onchange="submit()". This worked for me. Do paste the relevant code too.

"Life is good"
I agree. Here's the link:
subject: jafvalidations-ajax problem