Class JsfView
java.lang.Object
org.springframework.faces.webflow.JsfView
- All Implemented Interfaces:
View
JSF-specific
View implementation.- Author:
- Jeremy Grelle, Phillip Webb
-
Field Summary
FieldsFields inherited from interface org.springframework.webflow.execution.View
RENDER_FRAGMENTS_ATTRIBUTE, USER_EVENT_STATE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionJsfView(jakarta.faces.component.UIViewRoot viewRoot, jakarta.faces.lifecycle.Lifecycle facesLifecycle, RequestContext context) Creates a new JSF view. -
Method Summary
Modifier and TypeMethodDescriptionGet the flow event the current state should handle.A memento holding the results of processing a user event.jakarta.faces.component.UIViewRootReturns the underlying view root.booleanTrue if a call toView.processUserEvent()raised a flow event the current state should handle.voidExecutes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through INVOKE_APPLICATION.voidrender()Performs the standard duties of the JSF RENDER_RESPONSE phase.voidUpdates the component state stored in View scope so that it remains in sync with the updated flow execution snapshotvoidsetViewRoot(jakarta.faces.component.UIViewRoot viewRoot) toString()booleanTrue if there is a user event queued this view should process.
-
Field Details
-
EVENT_KEY
- See Also:
-
-
Constructor Details
-
JsfView
public JsfView(jakarta.faces.component.UIViewRoot viewRoot, jakarta.faces.lifecycle.Lifecycle facesLifecycle, RequestContext context) Creates a new JSF view.- Parameters:
viewRoot- the view rootfacesLifecycle- the flow faces lifecyclecontext- the current flow request
-
-
Method Details
-
getViewRoot
public jakarta.faces.component.UIViewRoot getViewRoot()Returns the underlying view root.- Returns:
- the view root
-
setViewRoot
public void setViewRoot(jakarta.faces.component.UIViewRoot viewRoot) -
render
Performs the standard duties of the JSF RENDER_RESPONSE phase.- Specified by:
renderin interfaceView- Throws:
IOException- if an IO Exception occured rendering the view
-
userEventQueued
public boolean userEventQueued()Description copied from interface:ViewTrue if there is a user event queued this view should process.- Specified by:
userEventQueuedin interfaceView- Returns:
- true if a user event is queued, false if not
-
processUserEvent
public void processUserEvent()Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through INVOKE_APPLICATION.- Specified by:
processUserEventin interfaceView- See Also:
-
saveState
public void saveState()Updates the component state stored in View scope so that it remains in sync with the updated flow execution snapshot -
getUserEventState
Description copied from interface:ViewA memento holding the results of processing a user event. Used to allow transient view state such as binding and validation errors to survive a flow execution redirect.- Specified by:
getUserEventStatein interfaceView- Returns:
- the serializable user event state object, or null if no event state needs managing
- See Also:
-
hasFlowEvent
public boolean hasFlowEvent()Description copied from interface:ViewTrue if a call toView.processUserEvent()raised a flow event the current state should handle. CallView.getFlowEvent()to access the Event.- Specified by:
hasFlowEventin interfaceView- Returns:
- true if yes, false otherwise
-
getFlowEvent
Description copied from interface:ViewGet the flow event the current state should handle. Returns an Event object whenView.hasFlowEvent()returns true. Returnsnullotherwise.- Specified by:
getFlowEventin interfaceView- Returns:
- the event, or
nullif there is no event for the flow system to handle
-
toString
-