Class ImportEnumTagHandler
- java.lang.Object
-
- javax.faces.view.facelets.TagHandler
-
- org.primefaces.component.importenum.ImportEnumTagHandler
-
- All Implemented Interfaces:
javax.faces.view.facelets.FaceletHandler
public class ImportEnumTagHandler extends javax.faces.view.facelets.TagHandlerTagHandlerfor theImportEnumcomponent.
-
-
Constructor Summary
Constructors Constructor Description ImportEnumTagHandler(javax.faces.view.facelets.TagConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)protected Class<?>getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)Gets theClassfrom theTagAttribute.protected Map<String,Object>getEnumValues(javax.faces.context.FacesContext facesContext, Class<?> type, String allSuffix)Get all enum values 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 theClassfrom theTagAttribute.- Parameters:
attribute- TheTagAttribute.ctx- TheFaceletContext.- Returns:
- The
Class.
-
getEnumValues
protected Map<String,Object> getEnumValues(javax.faces.context.FacesContext facesContext, Class<?> type, String allSuffix)
Get all enum values of the givenClass.- Parameters:
facesContext- TheFacesContext.type- The enum class.allSuffix- The suffix to access a array with all enum values.- Returns:
- A
Mapwith the enum values.
-
-