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 theImportConstants
component.
-
-
Constructor Summary
Constructors Constructor Description ImportConstantsTagHandler(javax.faces.view.facelets.TagConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
protected static Map<String,Object>
collectConstants(Class<?> type)
Collects all constants of the givenClass
.protected Class<?>
getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)
Gets theClass
from theTagAttribute
.protected Map<String,Object>
getConstants(javax.faces.context.FacesContext facesContext, Class<?> type)
Get all constants of the givenClass
.
-
-
-
Method Detail
-
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 theClass
from theTagAttribute
.- Parameters:
attribute
- TheTagAttribute
.ctx
- TheFaceletContext
.- Returns:
- The
Class
.
-
getConstants
protected Map<String,Object> getConstants(javax.faces.context.FacesContext facesContext, Class<?> type)
Get all constants of the givenClass
.- Parameters:
facesContext
- TheFacesContext
.type
- The class which includes the constants.- Returns:
- A
Map
with the constants.
-
-