Wednesday, October 13, 2010

JSF2 complete reference

28 - 55

restore view
the tree is kept in FacesContext

apply request values
processDecodes on the UIViewRoot
only ValueHolder uiComponents can hold values
only EditableValueHolder components can have their value changed
the values are kept on each component in submittedValue
the ones that have events implement ActionSource interface
events are queued at this phase
immediate attribute makes it skip this phase


process validations
data conversion
processValidators on the UIViewRoot
when a validation or conversion fails the valid attribute is set to false and
a FacesMessage is queued on the FacesContext


update model values
this is where the managed beans properties that were bound get updated
processUpdates on the UIViewRoot
processUpdates is overridden in the UIInput components and call an extra
updateModel method


invoke application
this is where the custom action code is called
processApplication on the UIViewRoot
call broadcast on each UIComponent that implements ActionSource
navigation happens here also
NavigationHandler calls handleNavigation
if the outcome which was received by the NavigationHandler
is registered -> facesContext.setViewRoot is called
h:link is the same as h:commandLink with attribute imediate set to true
if immediate is set for EditableValueHolder then its validations
occur in apply request values phase


render response
encode methods happen here
saving of the current state of the View

---------------------------------------

phase listeners - class which implements PhaseListener and
it's declared in faces-config or added programmatically
registered on the lifecycle instance

No comments: