Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Immediate=true VS immediate=false in JSF Component

I was reading Core JavaServer Faces and I was working on Event Handling. It says that if immediate=true for a component(lets say for a button), when we click that button, the process validation, and invoke application faces of the JSF life cycle will be done early. What does it mean? Can any body explain to me what the immediate=true will affect in each phases? I am confused.

Thank you.

like image 953
matiman Avatar asked Jun 01 '11 04:06

matiman


People also ask

What is immediate true JSF?

With immediate="true" on the button, the action is indeed invoked during apply request values phase and all the remaining phases are skipped. That's also the sole point of this attribute: process (decode, validate, update and invoke) the component immediately during apply request values phase.

What is immediate attribute?

The immediate attribute can be used to achieve the following effects: Allow a commandLink or commandButton to navigate the user to another page without processing any data currently in input fields of the current screen. In particular, this allows navigation to occur even when there are currently validation errors.


1 Answers

The following link most clearly demonstrates the JSF Lifecycle Phases, How to Debug them, and how immediate=true affects this.

http://balusc.blogspot.com/2006/09/debug-jsf-lifecycle.html#AddImmediateTrueToUIInputOnly

like image 75
maple_shaft Avatar answered Sep 18 '22 20:09

maple_shaft