|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.application.ViewHandler de.mindmatters.faces.application.ViewBuilder
public abstract class ViewBuilder
ViewBuilder is the pluggablity mechanism for allowing implementations of or applications using the JavaServer Faces specification to provide their own handling of the activities in the Render Response and Restore View phases of the request processing lifecycle.
A ViewBuilder has the ability to create, restore and
build a view. Building a view means restoring the component
tree structure of a faces view without the need of a serialized tree
structure state. Method buildView(FacesContext, String)
will be invoked everytime a view id (FacesUtils.VIEWID_PARAM
)
and no component view state is submitted by a request.
Note: Usually a view created by
buildView(FacesContext, String)
holds the default
component state. Any state changes of the components during the request
lifecycle will be ignored since it cannot be restored (because usually
whether component tree state nor component value state is submitted)
AbstractDelegatingViewBuilder
,
FaceletViewBuilder
Field Summary |
---|
Fields inherited from class javax.faces.application.ViewHandler |
---|
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME |
Constructor Summary | |
---|---|
ViewBuilder()
|
Method Summary | |
---|---|
abstract UIViewRoot |
buildView(FacesContext context,
java.lang.String viewId)
Perform whatever actions are required to build the view associated with the specified FacesContext and viewId . |
static void |
markForTransientState(FacesContext context)
Marks a request to not save the state of the view into the response. |
static void |
unmarkTransientState(FacesContext context)
Releases the marker to not save the state of the view into the response. |
void |
writeState(FacesContext context)
Take any appropriate action to either immediately
write out the current state information (by calling
|
protected abstract void |
writeStateInClient(FacesContext context)
Writes the state of a view into the response. |
Methods inherited from class javax.faces.application.ViewHandler |
---|
calculateLocale, calculateRenderKitId, createView, getActionURL, getResourceURL, renderView, restoreView |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewBuilder()
Method Detail |
---|
public static final void markForTransientState(FacesContext context)
context
- FacesContext
for the current requestpublic static final void unmarkTransientState(FacesContext context)
context
- FacesContext
for the current requestpublic final void writeState(FacesContext context) throws java.io.IOException
Take any appropriate action to either immediately
write out the current state information (by calling
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
, or noting where state information
should later be written.
writeState
in class ViewHandler
context
- FacesContext
for the current request
java.io.IOException
- if an input/output error occursprotected abstract void writeStateInClient(FacesContext context) throws java.io.IOException
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
context
- FacesContext
for the current request
java.io.IOException
- if an input/output error occursViewHandler.writeState(FacesContext)
public abstract UIViewRoot buildView(FacesContext context, java.lang.String viewId)
FacesContext
and viewId
. Building a
view means to restore the component tree structure of a view
without the need of a serialized state representing the
structure.
context
- FacesContext
for the current requestviewId
- the view identifier for the current request
UIViewRoot
representing the view
java.lang.NullPointerException
- if context
is null
FacesException
- if a servlet error occurs
|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |