com.liferay.faces.bridge.application
Class ViewHandlerCompatImpl

java.lang.Object
  extended by javax.faces.application.ViewHandler
      extended by javax.faces.application.ViewHandlerWrapper
          extended by com.liferay.faces.bridge.application.ViewHandlerCompatImpl
All Implemented Interfaces:
javax.faces.FacesWrapper<javax.faces.application.ViewHandler>
Direct Known Subclasses:
ViewHandlerImpl

public abstract class ViewHandlerCompatImpl
extends javax.faces.application.ViewHandlerWrapper

This class provides a compatibility layer that isolates differences between JSF1 and JSF2.

Author:
Neil Griffin

Field Summary
static String RESPONSE_CHARACTER_ENCODING
           
 
Fields inherited from class javax.faces.application.ViewHandler
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, FACELETS_SUFFIX_PARAM_NAME, FACELETS_VIEW_MAPPINGS_PARAM_NAME
 
Constructor Summary
ViewHandlerCompatImpl()
           
 
Method Summary
protected  String evaluateExpressionJSF1(javax.faces.context.FacesContext facesContext, String viewId)
          Mojarra 1.x does not have the ability to process faces-config navigation-rule entries with to-view-id containing EL-expressions.
 String getRedirectURL(javax.faces.context.FacesContext facesContext, String viewId, Map<String,List<String>> parameters, boolean includeViewParams)
           
 void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender)
           
 
Methods inherited from class javax.faces.application.ViewHandlerWrapper
calculateCharacterEncoding, calculateLocale, calculateRenderKitId, createView, deriveLogicalViewId, deriveViewId, getActionURL, getBookmarkableURL, getResourceURL, getViewDeclarationLanguage, getWrapped, initView, restoreView, writeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESPONSE_CHARACTER_ENCODING

public static final String RESPONSE_CHARACTER_ENCODING
See Also:
Constant Field Values
Constructor Detail

ViewHandlerCompatImpl

public ViewHandlerCompatImpl()
Method Detail

renderView

public void renderView(javax.faces.context.FacesContext context,
                       javax.faces.component.UIViewRoot viewToRender)
                throws IOException,
                       javax.faces.FacesException
Overrides:
renderView in class javax.faces.application.ViewHandlerWrapper
Throws:
IOException
javax.faces.FacesException

evaluateExpressionJSF1

protected String evaluateExpressionJSF1(javax.faces.context.FacesContext facesContext,
                                        String viewId)
Mojarra 1.x does not have the ability to process faces-config navigation-rule entries with to-view-id containing EL-expressions. This method compensates for that shortcoming by evaluating the EL-expression that may be present in the specified viewId.

Parameters:
facesContext - The current FacesContext.
viewId - The viewId that may contain an EL expression.
Returns:
If an EL-expression was present in the specified viewId, then returns the evaluated expression. Otherwise, returns the specified viewId unchanged.

getRedirectURL

public String getRedirectURL(javax.faces.context.FacesContext facesContext,
                             String viewId,
                             Map<String,List<String>> parameters,
                             boolean includeViewParams)
Overrides:
getRedirectURL in class javax.faces.application.ViewHandlerWrapper


Copyright © 2014 Liferay, Inc.. All Rights Reserved.