Used inside of the metadata facet of a view, this tag will import a mapping of all constant field values of the given type in the current view.
Constant field values are all public static final fields of the given type.
The map key represents the constant field name as String.
The map value represents the actual constant field value.
This works for classes, interfaces and enums.
This tag can also be declared outside of the metadata facet of a view.
In that case, the resolved constants will be available to all UI component renderers, but not to tag handlers positioned before this tag.
Additionally, when declared outside of the metadata facet, the corresponding component will not be returned by ViewMetadata.getImportConstants().
| Info | Value |
|---|---|
| Component Type | jakarta.faces.ImportConstants |
| Handler Class | None |
| Renderer Type | None |
| Description | None |
| Name | Required | Type | Description |
|---|---|---|---|
type | true | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
|
The fully qualified name of the type to import the constant field values for. |
var | false | java.lang.String |
Name of request scope attribute under which constants will be exposed as a Map. Defaults to the simple name of the given type. |