|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.buildtools.maven2.plugin.builder.model.ClassMeta
org.apache.myfaces.buildtools.maven2.plugin.builder.model.TagMeta
public class TagMeta
Represents metadata about a class that is just a pure JSF Tag class, with no corresponding JSF component, validator or converter.
There are not very many pure tag classes, but there are a few. One example is the f:attribute tag from the JSF core specification, which exists solely to store an entry into the attributes map of some other component when the view is first created.
Another example is the f:converter tag, which creates a corresponding converter component by id, and stores it into the view. The tag doesn't correspond to any particular converter class, so there is no converter class whose annotations can be used to describe this generic tag. Note that specific converters can also have their own dedicated tags (eg f:convertDateTime) in which case the TLD entry is generated using metadata from the converter class.
Another case when this is needed is where there are multiple tags that correspond to a single component class. For example, in the core implementation both f:outputText and f:verbatim are implemented with the UIOutputText component. In this case, the component is used to generate one TLD entry (the "primary" tag) but TLD entries for the "secondary" tag must be triggered in another way.
In the above cases, the tag class itself can be annotated with this annotation. During TLD file generation, an appropriate entry is then added.
An alternative is to omit this entry, and simply write the TLD entries for these few classes by hand in the "base" file that gets included into the generated one.
Field Summary | |
---|---|
protected Map |
_attributes
|
Constructor Summary | |
---|---|
TagMeta()
Constructor. |
Method Summary | |
---|---|
void |
addAttribute(AttributeMeta attribute)
Adds a property to this component. |
static void |
addXmlRules(org.apache.commons.digester.Digester digester,
String prefix)
Add digester rules to repopulate an instance of this type from an xml file. |
Iterator |
attributes()
Returns an iterator for all properties |
int |
attributesSize()
Number of properties for this component |
AttributeMeta |
getAttribute(String attributeName)
|
Collection |
getAttributeList()
|
String |
getBodyContent()
|
String |
getDescription()
|
String |
getLongDescription()
|
String |
getName()
|
String |
getTagHandler()
|
boolean |
hasAttributes()
Returns true if this component has any properties. |
void |
merge(TagMeta other)
Merge the data in the specified other property into this one, throwing an exception if there is an incompatibility. |
void |
setBodyContent(String bodyContent)
|
void |
setDescription(String description)
Sets the brief description of this property. |
void |
setLongDescription(String longDescription)
Sets the long description of this property. |
void |
setName(String name)
Sets the name that the user will refer to instances of this component by. |
void |
setTagHandler(String tagHandler)
Specifies the class of the Facelets tag handler (component handler) for this component. |
protected void |
writeXmlSimple(XmlWriter out)
Write an instance of this class out as xml. |
Methods inherited from class org.apache.myfaces.buildtools.maven2.plugin.builder.model.ClassMeta |
---|
addInterfaceClassName, getClassName, getInterfaceClassNames, getModelId, getPackageName, getParentClassName, getSourceClassName, getSourceClassParentClassName, merge, setClassName, setInterfaceClassNames, setModelId, setParentClassName, setSourceClassName, setSourceClassParentClassName, writeXml, writeXmlComplex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map _attributes
Constructor Detail |
---|
public TagMeta()
Method Detail |
---|
protected void writeXmlSimple(XmlWriter out)
writeXmlSimple
in class ClassMeta
public static void addXmlRules(org.apache.commons.digester.Digester digester, String prefix)
public void merge(TagMeta other)
public void setDescription(String description)
This description is used in tooltips, etc.
public String getDescription()
public void setLongDescription(String longDescription)
public String getLongDescription()
public void setBodyContent(String bodyContent)
public String getBodyContent()
public void setName(String name)
In JSP tags, this value will be used as the JSP tag name.
This property is optional; if not set then this Model instance represents a base class that components can be derived from, but which cannot itself be instantiated as a component.
public String getName()
public void setTagHandler(String tagHandler)
Note that a Facelets tag handler class is not needed for most components.
public String getTagHandler()
public void addAttribute(AttributeMeta attribute)
addAttribute
in interface AttributeHolder
public AttributeMeta getAttribute(String attributeName)
getAttribute
in interface AttributeHolder
public int attributesSize()
public boolean hasAttributes()
public Iterator attributes()
attributes
in interface AttributeHolder
public Collection getAttributeList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |