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
Fields inherited from interface org.springframework.webflow.execution.View
RENDER_FRAGMENTS_ATTRIBUTE, USER_EVENT_STATE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionJsfView
(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.UIViewRoot
Returns the underlying view root.boolean
True if a call toView.processUserEvent()
raised a flow event the current state should handle.void
Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through INVOKE_APPLICATION.void
render()
Performs the standard duties of the JSF RENDER_RESPONSE phase.void
Updates the component state stored in View scope so that it remains in sync with the updated flow execution snapshotvoid
setViewRoot
(jakarta.faces.component.UIViewRoot viewRoot) toString()
boolean
True 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:
render
in interfaceView
- Throws:
IOException
- if an IO Exception occured rendering the view
-
userEventQueued
public boolean userEventQueued()Description copied from interface:View
True if there is a user event queued this view should process.- Specified by:
userEventQueued
in 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:
processUserEvent
in 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:View
A 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:
getUserEventState
in 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:View
True if a call toView.processUserEvent()
raised a flow event the current state should handle. CallView.getFlowEvent()
to access the Event.- Specified by:
hasFlowEvent
in interfaceView
- Returns:
- true if yes, false otherwise
-
getFlowEvent
Description copied from interface:View
Get the flow event the current state should handle. Returns an Event object whenView.hasFlowEvent()
returns true. Returnsnull
otherwise.- Specified by:
getFlowEvent
in interfaceView
- Returns:
- the event, or
null
if there is no event for the flow system to handle
-
toString
-