|
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 de.mindmatters.faces.application.AbstractDelegatingViewBuilder
public abstract class AbstractDelegatingViewBuilder
Abstract implementation of a ViewBuilder that delegates the
behaviour inherited from the ViewHandler
to the original view handler
of the underlying JSF implementation.
Field Summary |
---|
Fields inherited from class javax.faces.application.ViewHandler |
---|
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME |
Constructor Summary | |
---|---|
AbstractDelegatingViewBuilder(ViewHandler delegate)
Constructor that takes the original ViewHandler . |
Method Summary | |
---|---|
java.util.Locale |
calculateLocale(FacesContext context)
Returns an appropriate |
java.lang.String |
calculateRenderKitId(FacesContext context)
Return an appropriate |
UIViewRoot |
createView(FacesContext context,
java.lang.String viewId)
Create and return a new |
java.lang.String |
getActionURL(FacesContext context,
java.lang.String viewId)
Return a URL suitable for rendering (after optional encoding
performed by the |
protected ViewHandler |
getDelegate()
|
java.lang.String |
getResourceURL(FacesContext context,
java.lang.String path)
Return a URL suitable for rendering (after optional encoding
perfomed by the |
void |
renderView(FacesContext context,
UIViewRoot viewToRender)
Perform whatever actions are required to render the response
view to the response object associated with the
current |
UIViewRoot |
restoreView(FacesContext context,
java.lang.String viewId)
Perform whatever actions are required to restore the view
associated with the specified |
protected void |
writeStateInClient(FacesContext context)
Writes the state of a view into the response. |
Methods inherited from class de.mindmatters.faces.application.ViewBuilder |
---|
buildView, markForTransientState, unmarkTransientState, writeState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDelegatingViewBuilder(ViewHandler delegate)
ViewHandler
.
delegate
- the original ViewHandler
Method Detail |
---|
public final java.util.Locale calculateLocale(FacesContext context)
Returns an appropriate Locale
to use for this and
subsequent requests for the current client.
calculateLocale
in class ViewHandler
context
- FacesContext
for the current requestpublic final java.lang.String calculateRenderKitId(FacesContext context)
Return an appropriate renderKitId
for this
and subsequent requests from the current client.
The default return value is RenderKitFactory.HTML_BASIC_RENDER_KIT
.
calculateRenderKitId
in class ViewHandler
context
- FacesContext
for the current requestpublic final UIViewRoot createView(FacesContext context, java.lang.String viewId)
Create and return a new UIViewRoot
instance
initialized with information from the argument
FacesContext
and viewId
.
If there is an existing ViewRoot
available on the
FacesContext
, this method must copy its
locale
and renderKitId
to this new view
root. If not, this method must call ViewHandler.calculateLocale(javax.faces.context.FacesContext)
and
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
, and store the results as the
values of the locale
and renderKitId
,
proeprties, respectively, of the newly created
UIViewRoot
.
createView
in class ViewHandler
public final java.lang.String getActionURL(FacesContext context, java.lang.String viewId)
Return a URL suitable for rendering (after optional encoding
performed by the encodeActionURL()
method of
ExternalContext
) that selects the specified view identifier.
getActionURL
in class ViewHandler
context
- FacesContext
for this requestviewId
- View identifier of the desired viewpublic final java.lang.String getResourceURL(FacesContext context, java.lang.String path)
Return a URL suitable for rendering (after optional encoding
perfomed by the encodeResourceURL()
method of
ExternalContext
) that selects the specifed web application
resource. If the specified path starts with a slash, it must be
treated as context relative; otherwise, it must be treated as relative
to the action URL of the current view.
getResourceURL
in class ViewHandler
context
- FacesContext
for the current requestpath
- Resource path to convert to a URLpublic final void renderView(FacesContext context, UIViewRoot viewToRender) throws java.io.IOException
Perform whatever actions are required to render the response
view to the response object associated with the
current FacesContext
.
renderView
in class ViewHandler
context
- FacesContext
for the current requestviewToRender
- the view to render
java.io.IOException
- if an input/output error occurspublic final UIViewRoot restoreView(FacesContext context, java.lang.String viewId)
Perform whatever actions are required to restore the view
associated with the specified FacesContext
and
viewId
. It may delegate to the restoreView
of the associated StateManager
to do the actual work of
restoring the view. If there is no available state for the
specified viewId
, return null
.
restoreView
in class ViewHandler
context
- FacesContext
for the current requestviewId
- the view identifier for the current requestprotected final ViewHandler getDelegate()
ViewHandler
protected final void writeStateInClient(FacesContext context) throws java.io.IOException
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
writeStateInClient
in class ViewBuilder
context
- FacesContext
for the current request
java.io.IOException
- if an input/output error occursViewHandler.writeState(FacesContext)
|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |