Facelet tag handler that renders a widget outside of a layout context, in a given mode.
This is helpful to reuse an existing widget within templates that do not need an entire layout to be defined.
In addition to the following attributes, any optional attributes are accepted and are used as properties of the created widget.
Attributes |
Name | Required | Request-time | Type | Description |
name | true | false | java.lang.String | Name of the widget type that will be used: can be 'text', 'template',... or any widget type registered on the pluggable layout system. |
mode | true | false | java.lang.String | Mode in which widget must be rendered. |
category | false | false | java.lang.String | Name of the widget type category that will be used. Available since 5.7.3, defaults implicitely to "jsf" when not set for compatibility. |
value | false | false | java.lang.String | The value on which widget will apply. If the "fields" attribute is not defined, it has to represent the bound property. Otherwise, it is used as a base for fields definitions that will represent the bound properties. |
field | false | false | java.lang.String | The field definition on which the widget will apply. Must resolve to a FieldDefinition instances, or String item. If fields is also defined, this field definitions is added to the list. Available since 5.5. |
fields | false | false | java.lang.String | The field definitions on which the widget will apply. Must resolve to a list of FieldDefinition instances, or a list of String items. Available since 5.4.2. |
widgetName | false | false | java.lang.String | The String widget Name. Available since 5.7. If is not present, a name is generated instead. |
properties | false | false | java.lang.String | The widget properties. Must resolve to an instance of Map. Any other tag attributes are accepted and will be added on top of these properties. Available since 5.4.2. |
label | false | false | java.lang.String | The String widget label. Available since 5.4.2. |
helpLabel | false | false | java.lang.String | The String widget help label. Available since 5.4.2. |
translated | false | false | java.lang.String | The boolean value stating if the widget labels have to be translated. Available since 5.4.2. |
ignoreTemplateProperty | false | false | java.lang.String | Boolean value stating if "template" property should be removed from the widget properties. Convenient attribute to avoid stack overflow errors when using another widget type in a widget template, for compatibility code for instance. Available since 5.6. |
subWidgets | false | false | java.lang.String | The array of widgets instances (Widget[]) to add to the created widget. Available since 5.6. |
resolveOnly | false | false | java.lang.Boolean | Boolean stating that the widget to render should be resolved and exposed in the context, but not displayed. Useful to generate the widget instance without rendering it right away. Available since 5.7. |