|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.application.ViewHandler
com.mycompany.jsf.pl.ClassViewHandler
This class is a JSF ViewHandler that works with views created by classes implementing the View interface.
Field Summary | |
protected javax.faces.application.ViewHandler |
origViewHandler
|
private static java.lang.String |
STATE_VAR
|
private java.util.Map |
views
|
Fields inherited from class javax.faces.application.ViewHandler |
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME |
Constructor Summary | |
ClassViewHandler(javax.faces.application.ViewHandler origViewHandler)
Creates an instance and saves a reference to the previously registered ViewHandler. |
Method Summary | |
java.util.Locale |
calculateLocale(javax.faces.context.FacesContext context)
Delegates the call to the previously registered ViewHandler. |
java.lang.String |
calculateRenderKitId(javax.faces.context.FacesContext context)
Delegates the call to the previously registered ViewHandler. |
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Returns the UIViewRoot for the specified view ID, created by the createViewRoot() method, with the "locale" and "renderKitId" properties initialized. |
protected javax.faces.component.UIViewRoot |
createViewRoot(javax.faces.context.FacesContext context,
java.lang.String viewId)
Returns the UIViewRoot for the view created by the View instance matching the view ID. |
java.lang.String |
getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
Delegates the call to the previously registered ViewHandler. |
java.lang.String |
getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
Delegates the call to the previously registered ViewHandler. |
protected void |
renderResponse(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Recursively renders the provided component and all its children by calling encodeBegin(), encodeChildren() (if the component renders its children) and encodeEnd(). |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
Gets the view state to save, if any, and puts a reference to the state in a request scope variable where it can be picked up by the writeState() method, and renders the view represented by the provided UIViewRoot instance by calling renderResponse(). |
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Returns the UIViewRoot for the restored view identified by the provided view ID, or null if no state is available. |
private void |
setupResponseWriter(javax.faces.context.FacesContext context)
Asks the current RenderKit to create a ResponseWriter around the OutputStream for the response body and sets the Content-Type response header to the MIME type selected by the ResponseWriter from the alternatives listed in the Accept request header. |
void |
writeState(javax.faces.context.FacesContext context)
Writes the state captured and saved by the renderView() method to the response with the help of the current StateManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String STATE_VAR
protected javax.faces.application.ViewHandler origViewHandler
private java.util.Map views
Constructor Detail |
public ClassViewHandler(javax.faces.application.ViewHandler origViewHandler)
Method Detail |
public java.util.Locale calculateLocale(javax.faces.context.FacesContext context)
public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext context)
public java.lang.String getActionURL(javax.faces.context.FacesContext context, java.lang.String viewId)
public java.lang.String getResourceURL(javax.faces.context.FacesContext context, java.lang.String path)
public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context, java.lang.String viewId)
public void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender) throws java.io.IOException
java.io.IOException
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context, java.lang.String viewId)
public void writeState(javax.faces.context.FacesContext context) throws java.io.IOException
java.io.IOException
protected javax.faces.component.UIViewRoot createViewRoot(javax.faces.context.FacesContext context, java.lang.String viewId)
protected void renderResponse(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
private void setupResponseWriter(javax.faces.context.FacesContext context) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |