org.primefaces.extensions.component.importenum
Class ImportEnumTagHandler

java.lang.Object
  extended by javax.faces.view.facelets.TagHandler
      extended by org.primefaces.extensions.component.importenum.ImportEnumTagHandler
All Implemented Interfaces:
javax.faces.view.facelets.FaceletHandler

public class ImportEnumTagHandler
extends javax.faces.view.facelets.TagHandler

TagHandler for the ImportEnum component.

Since:
0.7
Version:
$Revision$
Author:
Thomas Andraschko / last modified by $Author$

Field Summary
 
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
ImportEnumTagHandler(javax.faces.view.facelets.TagConfig config)
          Default constructor.
 
Method Summary
 void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
          
protected  java.lang.Class<?> getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)
          Gets the Class from the TagAttribute.
protected  java.util.Map<java.lang.String,java.lang.Object> getEnumValues(java.lang.Class<?> clazz, java.lang.String allPrefix)
          Get all enum values 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 Detail

ImportEnumTagHandler

public ImportEnumTagHandler(javax.faces.view.facelets.TagConfig config)
Default constructor.

Parameters:
config - The TagConfig.
Method Detail

apply

public void apply(javax.faces.view.facelets.FaceletContext ctx,
                  javax.faces.component.UIComponent parent)
           throws java.io.IOException

Throws:
java.io.IOException

getClassFromAttribute

protected java.lang.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.

getEnumValues

protected java.util.Map<java.lang.String,java.lang.Object> getEnumValues(java.lang.Class<?> clazz,
                                                                         java.lang.String allPrefix)
Get all enum values of the given Class.

Parameters:
clazz - The enum class.
Returns:
A Map with the enum values.


Copyright © 2011-2013. All Rights Reserved.