Monday, May 17, 2010

JSF immediate=true - Examine

When setting immediate=true in JSF command button we can able to skip validation and model update phase. This is helpful while implementing the cancel button functionality

JSF Phases:
1. Restore View Phase
2. Apply Request Values Phase
3. Covert and Validations Phase
4. Update Model Values Phase
5. Invoke Application Phase
6. Render Response Phase

When immediate=true is defined then JSF will skip execution of Phase 3 and 4 ie., convertion, validation and model update wont happen.

Example:

No comments:

Post a Comment