Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.myfaces.orchestra.urlParamNav
Class UrlParameterViewHandler

    java.lang.Object
      javax.faces.application.ViewHandler
          org.apache.myfaces.orchestra.urlParamNav.UrlParameterViewHandler

    public class UrlParameterViewHandler

extends javax.faces.application.ViewHandler

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

### UrlParameterViewHandler

    public UrlParameterViewHandler(javax.faces.application.ViewHandler original)

  Constructor.

Method Detail

### calculateCharacterEncoding

    public java.lang.String calculateCharacterEncoding(javax.faces.context.FacesContext context)

  Delegate to wrapped instance.

  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.

  Since:
    1.3

### initView

    public void initView(javax.faces.context.FacesContext context)
                  throws javax.faces.FacesException

  Delegate to wrapped instance.

  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.

  Throws:
    `javax.faces.FacesException`
  Since:
    1.3

### calculateLocale

    public java.util.Locale calculateLocale(javax.faces.context.FacesContext context)

  Specified by:
    `calculateLocale` in class `javax.faces.application.ViewHandler`

### calculateRenderKitId

    public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext context)

  Specified by:
    `calculateRenderKitId` in class `javax.faces.application.ViewHandler`

### createView

    public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context,
                                                       java.lang.String viewId)

  Specified by:
    `createView` in class `javax.faces.application.ViewHandler`

### getActionURL

    public java.lang.String getActionURL(javax.faces.context.FacesContext context,
                                         java.lang.String viewId)

  Specified by:
    `getActionURL` in class `javax.faces.application.ViewHandler`

### getResourceURL

    public java.lang.String getResourceURL(javax.faces.context.FacesContext context,
                                           java.lang.String path)

  Specified by:
    `getResourceURL` in class `javax.faces.application.ViewHandler`

### renderView

    public void renderView(javax.faces.context.FacesContext context,
                           javax.faces.component.UIViewRoot viewToRender)
                    throws java.io.IOException,
                           javax.faces.FacesException

  Specified by:
    `renderView` in class `javax.faces.application.ViewHandler`
  Throws:
    `java.io.IOException`
    `javax.faces.FacesException`

### restoreView

    public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
                                                        java.lang.String viewId)

  Specified by:
    `restoreView` in class `javax.faces.application.ViewHandler`

### writeState

    public void writeState(javax.faces.context.FacesContext context)
                    throws java.io.IOException

  Specified by:
    `writeState` in class `javax.faces.application.ViewHandler`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation. All Rights Reserved.