Annotation Type FacesComponent
-
@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface FacesComponent
The presence of this annotation on a class that extends
UIComponentmust cause the runtime to register this class as a component suitable for inclusion in a view. If thecreateTagattribute istrue, the runtime must create a corresponding Facelet tag handler according to the rules specified in the attributes of this annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancreateTagIf the value of this attribute istrue, the runtime must create a Facelet tag handler, that extends fromComponentHandler, suitable for use in pages under the tag library with namespace given by the value of thenamespace()attribute.StringnamespaceIf the value of thecreateTag()attribute istrue, the value of this attribute is taken to be the tag library namespace into which this component is placed.StringtagNameIf the value of thecreateTag()attribute istrue, the runtime must use this value as the tag name for including an instance of the component annotated with this annotation in a view.StringvalueThe value of this annotation attribute is taken to be the component-type with which instances of this class of component can be instantiated by callingApplication.createComponent(java.lang.String).
-
-
-
Field Detail
-
NAMESPACE
static final String NAMESPACE
Components that declare a
createTag = trueattribute will be placed into this tag namespace if the namespace attribute is omitted.
-
-
Element Detail
-
value
String value
The value of this annotation attribute is taken to be the component-type with which instances of this class of component can be instantiated by calling
Application.createComponent(java.lang.String). If no value is specified, or the value isnull, the value is taken to be the return of callinggetSimpleNameon the class to which this annotation is attached and lowercasing the first character. If more than one component with this derived name is found, the results are undefined.- Returns:
- the component type.
- Default:
- ""
-
-
-
createTag
boolean createTag
If the value of this attribute is
true, the runtime must create a Facelet tag handler, that extends fromComponentHandler, suitable for use in pages under the tag library with namespace given by the value of thenamespace()attribute.- Returns:
trueto create the Facelet tag handler,falseotherwise.
- Default:
- false
-
-
-
tagName
String tagName
If the value of the
createTag()attribute istrue, the runtime must use this value as the tag name for including an instance of the component annotated with this annotation in a view. If this attribute is not specified on a usage of this annotation, the simple name of the class on which this annotation is declared, with the first character lowercased, is taken to be the value.- Returns:
- the tag name.
- Default:
- ""
-
-
-
namespace
String namespace
If the value of the
createTag()attribute istrue, the value of this attribute is taken to be the tag library namespace into which this component is placed.- Returns:
- the namespace.
- Default:
- "jakarta.faces.component"
-
-