jsf 2 - p:commandButton with immediate=true -


what action taken when declare immediate="true" in command button? documentation says

boolean value determines phaseid of action event, when true actions processed @ "apply request values", when false @ "invoke application" phase.

however, don't understand it. can please explain this?

jsf lifecycle contains 6 phases, are:

  1. restore view
  2. apply request values
  3. process validations
  4. update model values
  5. invoke application
  6. render response

if command button has immediate="true", phases 'process validations' , 'update model values' skipped. therefore, convertions , validations not processed , attributes in managed bean not updated.

however, if uiinput in form has immediate="true", value converted, validated , updated in managed bean, because happen in 'apply request values' phase.

one example of when might use button immediate="true" case of 'cancel' button.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -