|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.application.ViewHandler
com.sun.jsfcl.app.ViewHandlerImpl
public class ViewHandlerImpl
ViewHandler implementation that allows events to be triggered upon the
occurrence of specific ViewHandler method calls. This implementation also
posts relevant lifecycle events to initialized page beans, so it also
implements PhaseListener.
FIXME - may need to provide an implementation of Lifecycle as well, in order to ensure that afterRenderResponse works even in the face of exceptions thrown by application code.
| Field Summary | |
|---|---|
static java.lang.String |
CREATED_VIEW
The request scope attribute under which we store the view id when createView() is called. |
| Fields inherited from class javax.faces.application.ViewHandler |
|---|
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME |
| Constructor Summary | |
|---|---|
ViewHandlerImpl(javax.faces.application.ViewHandler handler)
Construct a new ViewHandlerImpl that delegates to the
specified ViewHandler instance. |
|
| Method Summary | |
|---|---|
void |
afterPhase(javax.faces.event.PhaseEvent event)
Process the specified after phase event. |
void |
beforePhase(javax.faces.event.PhaseEvent event)
Process the specified before phase event. |
java.util.Locale |
calculateLocale(javax.faces.context.FacesContext context)
Return an appropriate Locale to use for this
and subsequent requests for the current client. |
java.lang.String |
calculateRenderKitId(javax.faces.context.FacesContext context)
Return an appropriate RenderKit identifier
for this and subsequent requests from the current
client. |
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Create and return a new UIViewRoot instance
initialized with information from this FacesContext
for the specified viewId. |
java.lang.String |
getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
Return a URL suitable for rendering that selects the specified view identifier. |
javax.faces.event.PhaseId |
getPhaseId()
Return PhaseId.ANY_PHASE because we are interested
in all phase events. |
java.lang.String |
getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
Return a URL suitable for rendering that selects the specified resource. |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot)
Perform the necessary actions to render the specified view as part of the current response. |
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Perform necessary actions to restore the specified view and return a corresponding UIViewRoot. |
void |
writeState(javax.faces.context.FacesContext context)
Take appropriate action to save the current state information. |
| Methods inherited from class javax.faces.application.ViewHandler |
|---|
calculateCharacterEncoding, initView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CREATED_VIEW
The request scope attribute under which we store the view id
when createView() is called.
| Constructor Detail |
|---|
public ViewHandlerImpl(javax.faces.application.ViewHandler handler)
Construct a new ViewHandlerImpl that delegates to the
specified ViewHandler instance.
handler - The ViewHandler instance to which we will delegate| Method Detail |
|---|
public java.util.Locale calculateLocale(javax.faces.context.FacesContext context)
Return an appropriate Locale to use for this
and subsequent requests for the current client.
calculateLocale in class javax.faces.application.ViewHandlercontext - FacesContext for the current request
java.lang.NullPointerException - if context
is nullpublic java.lang.String calculateRenderKitId(javax.faces.context.FacesContext context)
Return an appropriate RenderKit identifier
for this and subsequent requests from the current
client.
calculateRenderKitId in class javax.faces.application.ViewHandlercontext - FacesContext for the current request
java.lang.NullPointerException - if context
is null
public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Create and return a new UIViewRoot instance
initialized with information from this FacesContext
for the specified viewId.
createView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewId - View identifier of the view to be created
java.lang.NullPointerException - if context
or viewId is null
public java.lang.String getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
Return a URL suitable for rendering that selects the specified view identifier.
getActionURL in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewId - View identifier of the desired view
java.lang.NullPointerException - if context
or viewId is null
public java.lang.String getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
Return a URL suitable for rendering that selects the specified resource.
getResourceURL in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestpath - Context-relative resource path to reference
java.lang.NullPointerException - if context
or path is null
public void renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot)
throws java.io.IOException,
javax.faces.FacesException
Perform the necessary actions to render the specified view as part of the current response.
renderView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewRoot - View to be rendered
java.lang.NullPointerException - if context
or viewRoot is null
java.io.IOException
javax.faces.FacesException
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Perform necessary actions to restore the specified view
and return a corresponding UIViewRoot. If there
is no view information to be restored, return null.
restoreView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewId - View identifier of the view to be restored
java.lang.NullPointerException - if context
or viewId is null
public void writeState(javax.faces.context.FacesContext context)
throws java.io.IOException
Take appropriate action to save the current state information.
writeState in class javax.faces.application.ViewHandlercontext - FacesContext for the current request
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if context
is nullpublic javax.faces.event.PhaseId getPhaseId()
Return PhaseId.ANY_PHASE because we are interested
in all phase events.
getPhaseId in interface javax.faces.event.PhaseListenerpublic void beforePhase(javax.faces.event.PhaseEvent event)
Process the specified before phase event.
beforePhase in interface javax.faces.event.PhaseListenerevent - PhaseEvent to be processedpublic void afterPhase(javax.faces.event.PhaseEvent event)
Process the specified after phase event.
afterPhase in interface javax.faces.event.PhaseListenerevent - PhaseEvent to be processed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||