Class ImportConstantsTagHandler

java.lang.Object
javax.faces.view.facelets.TagHandler
org.primefaces.component.importconstants.ImportConstantsTagHandler
All Implemented Interfaces:
javax.faces.view.facelets.FaceletHandler

public class ImportConstantsTagHandler extends javax.faces.view.facelets.TagHandler
TagHandler for the ImportConstants component.
  • Field Summary

    Fields inherited from class javax.faces.view.facelets.TagHandler

    nextHandler, tag, tagId
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImportConstantsTagHandler(javax.faces.view.facelets.TagConfig config)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
     
    protected static Map<String,Object>
    Collects all constants of the given Class.
    protected Class<?>
    getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)
    Gets the Class from the TagAttribute.
    protected Map<String,Object>
    getConstants(javax.faces.context.FacesContext facesContext, Class<?> type)
    Get all constants of the given Class.

    Methods inherited from class javax.faces.view.facelets.TagHandler

    getAttribute, getRequiredAttribute, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ImportConstantsTagHandler

      public ImportConstantsTagHandler(javax.faces.view.facelets.TagConfig config)
  • Method Details

    • apply

      public void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent) throws IOException
      Throws:
      IOException
    • getClassFromAttribute

      protected Class<?> getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)
      Gets the Class from the TagAttribute.
      Parameters:
      attribute - The TagAttribute.
      ctx - The FaceletContext.
      Returns:
      The Class.
    • getConstants

      protected Map<String,Object> getConstants(javax.faces.context.FacesContext facesContext, Class<?> type)
      Get all constants of the given Class.
      Parameters:
      facesContext - The FacesContext.
      type - The class which includes the constants.
      Returns:
      A Map with the constants.
    • collectConstants

      protected static Map<String,Object> collectConstants(Class<?> type)
      Collects all constants of the given Class.
      Parameters:
      type - The class which includes the constants.
      Returns:
      A Map with the found constants.