File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes what happen when ajax= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "what happen when ajax="true" & ajax="false" from jsf lifecyle perspective" Watch "what happen when ajax="true" & ajax="false" from jsf lifecyle perspective" New topic
Author

what happen when ajax="true" & ajax="false" from jsf lifecyle perspective

Mayuresh Rahate
Greenhorn

Joined: Aug 14, 2011
Posts: 7
Hello,
I have newly started learning JSF along with primefaces.
In PrimeFaces for commandButton we have one attribute "ajax" but dont know the exact behavior of this attribute.
Please Explain me the behavior in terms of JSF lifecycle.
Louis Bros
Ranch Hand

Joined: Jun 03, 2011
Posts: 54

Hi,

You can use JSF AJAX to process selected components on the server and render selected elements on the client.



With PrimeFaces:



Ta


OCA7
Mayuresh Rahate
Greenhorn

Joined: Aug 14, 2011
Posts: 7
Hello Louis,
Thanks for your reply..but i don't want any alternative for ajax attribute..i just want what happen if i used ajax attribute for p:commandButton. i want behavior when ajax="true" & ajax="false" in terms of JSF lifeCycle
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

AJAX requests initiate an HTTP request/response cycle from within a displayed webpage, in contrast to the more familiar full-page request/response cycle.

Basically, what it does in terms of JSF is it performs a form submit where the output comes back to logic instead of to the browser's page-rendering engine. The logic can then do whatever it wants with the returned data. Most often this includes modifying the current page display (partial page re-rendering).

In addition to the ability to render only parts of the displayed webpage, AJAX can also restrict what controls are included on the AJAX-driven form submit (partial forms submission). This can be useful when you don't (yet) want to update certain properties of the backing bean. A common reason for this involves cases where you want AJAX functionality when other controls in the form contain invalid values, since the AJAX submit is still going through the same basic JSF lifecycle and that means that ALL submitted values must be valid or the entire request is rejected.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what happen when ajax="true" & ajax="false" from jsf lifecyle perspective