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:
- restore view
- apply request values
- process validations
- update model values
- invoke application
- 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
Post a Comment