aspose file tools*
The moose likes JSF and the fly likes Input validation is not happening with ajaxify command button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Input validation is not happening with ajaxify command button" Watch "Input validation is not happening with ajaxify command button" New topic
Author

Input validation is not happening with ajaxify command button

prasad kakani
Ranch Hand

Joined: Jul 15, 2008
Posts: 59

Hi All,

I tried alot to validate the input fields with ajax call of command button. Its not working at all.. But if we just use command action then validation is happening. Dont know what is happening inside the code..Can you please help me out??


This is my code.






if <f:ajax execute="@this" render="@form"/> is removed then validation is happeing.but this code is placed then validation is not happening. Dont know exactly what is happening here..


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

I can venture a suggestion. It's the best I can do until I can spare the time to actually learn how the JSF2 ajax tag works (I'm still working with RichFaces3).

In RichFaces, at least, there's the ability to limit the data being transmitted when a submit is done. "immediate="true"" would submit no data at all (basic JSF), "ajaxSingle="true"" would submit only the value of the control that contained the ajax submit (RichFaces a4j:support tag), and no qualification would submit the entire form.

So what I suspect is that your f:ajax tag is doing is the equivalent of the RichFaces "ajaxSingle" submit and you need to modify it to widen the data set being submitted.


Customer surveys are for companies who didn't pay proper attention to begin with.
prasad kakani
Ranch Hand

Joined: Jul 15, 2008
Posts: 59
Yeah you are correct Tim,

if i use <f:ajax execute="@all" render="@form"/> instead of <f:ajax execute="@this" render="@form"/>

Then it is working fine..

Thanks Alot Tim.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Input validation is not happening with ajaxify command button