Class SkinnableViewHandler

All Implemented Interfaces:
FacesWrapper<ViewHandler>

public class SkinnableViewHandler extends ViewHandlerWrapper
View handler which can resolve skinned properties.
  • Field Details

    • INIT_PARAM_RESOLVE_SKINNED_RESOURCES

      public static final String INIT_PARAM_RESOLVE_SKINNED_RESOURCES
      Binding expression which indicates whether or not to resolve skinned resources for the current context.
      See Also:
    • INIT_PARAM_SKINNED_RESOURCES_DIRECTORY

      public static final String INIT_PARAM_SKINNED_RESOURCES_DIRECTORY
      Binding expression which indicates the directory containing skinned resources.
      See Also:
    • SKIN_PREFIX

      public static final String SKIN_PREFIX
      See Also:
    • ALT_PREFIX

      public static final String ALT_PREFIX
      See Also:
    • m_parent

      protected ViewHandler m_parent
    • m_resolveSkinnedResources

      protected ValueExpression m_resolveSkinnedResources
    • m_skinnedResourcesDirectory

      protected ValueExpression m_skinnedResourcesDirectory
    • m_skinnedResourcesPaths

      protected Map<String,String> m_skinnedResourcesPaths
  • Constructor Details

    • SkinnableViewHandler

      public SkinnableViewHandler(ViewHandler parent)
      Standard ViewHandler constructor.
  • Method Details

    • getWrapped

      public ViewHandler getWrapped()
      Specified by:
      getWrapped in interface FacesWrapper<ViewHandler>
      Overrides:
      getWrapped in class ViewHandlerWrapper
    • getResourceURL

      public String getResourceURL(FacesContext ctx, String path)
      Overrides:
      getResourceURL in class ViewHandlerWrapper
    • resolveSkinnedResources

      protected boolean resolveSkinnedResources(FacesContext ctx)
      Returns true to resolve skinned resources for the specified context; false to ignore skinned resources.
    • getSkinnedResourcesDirectory

      protected String getSkinnedResourcesDirectory(FacesContext ctx)
      Returns the path to the directory in this war containing the skinned resources. Use forward-slashes ("/") for path separators. Null, empty string (""), or forward-slash ("/") indicates the root of the war.
    • getSkinnedResourcesPaths

      protected Map<String,String> getSkinnedResourcesPaths(FacesContext ctx)
      Returns the map of skin names to actual resource paths. Ex: {images/move-left.gif=/myskin/images/move-left.gif, images/move-right.gif=/myskin/images/move-right.gif}
    • getSkinnedResourcePath

      protected String getSkinnedResourcePath(FacesContext ctx, String name)
      Returns the actual resource path for the specified skinned resource name, or null if the there is no resource for the specified name. For example, might return "/myskin/images/move-right.gif" for "images/move-right.gif" name. Note that the actual resource path MUST NOT start with "/skin/".