Let's start at the beginning, components that implement the interfaces below support an attribute called "immediate". In both cases processing is moved up to the APPLY REQUEST VALUES phase.
- ActionSource: (an example is commandButton.) An ActionEvent is normally delivered in INVOKE APPLICATION. When immediate is true the action event delivery is moved up to the APPLY REQUEST VALUES phase. An ActionEvent always results in renderResponse() being called implicitly in the default ActionListener (Application.getActionListener()), whether or not an "action" is attached.
- EditableValueHolder: the validation and valueChangeEvent usually take place in the PROCESS VALIDATIONS phase. When immediate is true the component's value will be converted and validated in the APPLY REQUEST VALUES phase, and ValueChangeEvents will be delivered in that phase as well.
So in JSF there's a default actionListener which calls renderResponse. That means that when a button is immediate renderResponse will be called during apply request values, and the validation phase will be skipped.
Let's look at the following example, note that when you press submit you don't get a required field error:
and in the validate bean here's the toggle method
Adf Faces adds the concept of "autoSubmit" to form controls, when "autoSubmit" is true the component will automatically submit when the value is changed. When people combine autoSubmit and immediate on a form control, they often expect to skip the validation phase like they would if they had used an immediate button, but there is no default listener for valueChangeEvents.
You might think you can just change the jspx to this without changing the toggle method.
However you also have to change the toggle method to call FacesContext.renderResponse, like so: