-
@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface FacesComponent
The presence of this annotation on a class that extends
UIComponent
must cause the runtime to register this class as a component suitable for inclusion in a view. If thecreateTag
attribute istrue
, the runtime must create a corresponding Facelet tag handler according to the rules specified in the attributes of this annotation.
-
-
Field Summary
Fields Modifier and Type Fields and Description static String
NAMESPACE
Components that declare a
createTag = true
attribute will be placed into this tag namespace if the namespace attribute is omitted.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element and Description 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.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.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.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)
.
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
Components that declare a
createTag = true
attribute will be placed into this tag namespace if the namespace attribute is omitted.
-
-
Element Detail
-
value
public abstract 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 callinggetSimpleName
on 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.- Default:
- ""
-
-
-
createTag
public abstract 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.- Default:
- false
-
-
-
tagName
public abstract 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.- Default:
- ""
-
-
-
namespace
public abstract 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.- Default:
- "http://xmlns.jcp.org/jsf/component"
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/faces/component/facescomponent.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.