|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.application.ViewHandler
org.apache.myfaces.orchestra.urlParamNav.UrlParameterViewHandler
public class UrlParameterViewHandler
Allow the to-view-id URL in a faces-config navigation case to include query parameters and EL expressions.
This class plays a few tricks to hide from the real NavigationHandler and ViewHandler classes the fact that a URL contains non-standard data.
This class also plays a few reflection-based tricks so that the code can be compiled against JSF1.1, and work with both JSF1.1 and JSF1.2. The code is a little fragile and will probably need to be updated to work correctly with JSF2.0, but that is the fault of the JSF spec.
Field Summary |
---|
Fields inherited from class javax.faces.application.ViewHandler |
---|
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME |
Constructor Summary | |
---|---|
UrlParameterViewHandler(javax.faces.application.ViewHandler original)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
calculateCharacterEncoding(javax.faces.context.FacesContext context)
Delegate to wrapped instance. |
java.util.Locale |
calculateLocale(javax.faces.context.FacesContext context)
|
java.lang.String |
calculateRenderKitId(javax.faces.context.FacesContext context)
|
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
java.lang.String |
getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
java.lang.String |
getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
|
void |
initView(javax.faces.context.FacesContext context)
Delegate to wrapped instance. |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
void |
writeState(javax.faces.context.FacesContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UrlParameterViewHandler(javax.faces.application.ViewHandler original)
Method Detail |
---|
public java.lang.String calculateCharacterEncoding(javax.faces.context.FacesContext context)
This method was added in JSF1.2. We must therefore use reflection to invoke the method on the wrapped instance. Note that this method is never invoked unless this is a JSF1.2 environment.
calculateCharacterEncoding
in class javax.faces.application.ViewHandler
public void initView(javax.faces.context.FacesContext context) throws javax.faces.FacesException
This method was added in JSF1.2. We must therefore use reflection to invoke the method on the wrapped instance. Note that this method is never invoked unless this is a JSF1.2 environment.
initView
in class javax.faces.application.ViewHandler
javax.faces.FacesException
public java.util.Locale calculateLocale(javax.faces.context.FacesContext context)
calculateLocale
in class javax.faces.application.ViewHandler
public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext context)
calculateRenderKitId
in class javax.faces.application.ViewHandler
public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context, java.lang.String viewId)
createView
in class javax.faces.application.ViewHandler
public java.lang.String getActionURL(javax.faces.context.FacesContext context, java.lang.String viewId)
getActionURL
in class javax.faces.application.ViewHandler
public java.lang.String getResourceURL(javax.faces.context.FacesContext context, java.lang.String path)
getResourceURL
in class javax.faces.application.ViewHandler
public void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender) throws java.io.IOException, javax.faces.FacesException
renderView
in class javax.faces.application.ViewHandler
java.io.IOException
javax.faces.FacesException
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context, java.lang.String viewId)
restoreView
in class javax.faces.application.ViewHandler
public void writeState(javax.faces.context.FacesContext context) throws java.io.IOException
writeState
in class javax.faces.application.ViewHandler
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |