• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 54
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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



With PrimeFaces:



Ta
 
Mayuresh Rahate
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 28424
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
There's a city wid manhunt for this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic