<anyxmlelement xmlns:nxl="http://nuxeo.org/nxforms/layout"/>
Nuxeo Layout Taglib
Defines tags to display layouts and widgets.
Note that some attributes are used to determine what components will be part of the jsf component tree, so they have to be resolved early: they cannot use variables like iteration variables, coming for instance from a ui:repeat or a h:dataTable tag. This is true for layout names, modes and widget instances.
Info | Value |
---|---|
ID (tag prefix) | nxl |
URI | http://nuxeo.org/nxforms/layout |
Tag | Description |
---|---|
widgetType |
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. When rendered, some variables are exposed to the resolution context:
<nxl:widgetType name="text" mode="#{myMode}" value="#{myText}" required="true" /> or <nxl:widgetType name="#{myWidgetType}" mode="#{myMode}" value="#{myBoundProperty}" properties="#{myProperties}" /> |
widget |
Facelet tag handler that renders a widget in a given mode. When rendered, some variables are exposed to the resolution context:
Any additional property set on the tag and that is not explicitely in the list of handled attributes is added to the widget properties, overriding properties that already set in the widget definition. Example:<nxl:widget widget="#{widget}" value="#{myObject}" /> or <nxl:widget name="widgetName" category="" mode="#{myMode}" value="#{myObject}" /> |
layout |
Facelet tag handler that renders a layout in a given mode. When rendered, some variables are exposed to the resolution context and can be used within the template attached to the layout.
Any additional property set on the tag and that is not explicitely in the list of handled attributes is added to the layout properties, overriding properties that already set in the layout definition. Example:<nxl:layout name="dublincore" mode="#{myMode}" value="#{myObject}" /> or <nxl:layout definition="#{myLayoutDefinition}" mode="#{myMode}" value="#{myObject}" /> or <nxl:layout layout="#{myLayoutInstance}" value="#{myObject}" /> |
layoutRow |
Facelet tag handler that iterates over layout rows in a layout template. When rendered, some variables are exposed to the resolution context and can be used inside the tag:
<table class="dataInput"> <tbody> <nxl:layoutRow> <tr> <nxl:layoutRowWidget> <td class="labelColumn"> <h:outputText value="#{widget.label}" rendered="#{!widget.translated}" /> <h:outputText value="#{messages[widget.label]}" rendered="#{widget.translated}" /> </td> <td class="fieldColumn"> <nxl:widget widget="#{widget}" mode="#{widget.mode}" value="#{value}" /> </td> </nxl:layoutRowWidget> </tr> </nxl:layoutRow> </tbody> </table> |
layoutColumn | Facelet tag handler equivalent to the layoutRow tag, available since 5.3.1. |
layoutRowWidget |
Facelet tag handler that iterates over widgets in a layoutRow tag, in a layout template. When rendered, some variables are exposed to the resolution context and can be used inside the tag:
<table class="dataInput"> <tbody> <nxl:layoutRow> <tr> <nxl:layoutRowWidget> <td class="labelColumn"> <h:outputText value="#{widget.label}" rendered="#{!widget.translated}" /> <h:outputText value="#{messages[widget.label]}" rendered="#{widget.translated}" /> </td> <td class="fieldColumn"> <nxl:widget widget="#{widget}" mode="#{widget.mode}" value="#{value}" /> </td> </nxl:layoutRowWidget> </tr> </nxl:layoutRow> </tbody> </table> |
layoutColumnWidget | Facelet tag handler equivalent to the layoutRowWidget tag, available since 5.3.1. |
subWidget |
Facelet tag handler that iterates over sub widgets in a template attached to the widget of type 'template'. When rendered, some variables are exposed to the resolution context and can be used inside the tag:
<table> <tbody> <nxu:inputList value="#{field_0}" id="#{widget.id}_table" model="model" rendered="#{not empty field_0}"> <nxl:subWidget> <tr> <td class="labelColumn"> <h:outputText value="#{messages[widget.label]}" styleClass="labelColumn" /> </td> <td class="fieldColumn"> <nxl:widget widget="#{widget}" mode="#{widget.mode}" value="#{model.rowData}" /> </td> </tr> </nxl:subWidget> </nxu:inputList> </tbody> </table> |
documentLayout |
Facelet tag handler that renders all layouts attached to a document in a given mode. Layouts are built using the document type definition. This tag is equivalent to rendering each layout in given mode, using document as value. Any additional property set on the tag and that is not explicitely in the list of handled attributes is added to each of the layouts properties, overriding properties that already set in the layout definitions. Example:<nxl:documentLayout mode="#{myMode}" value="#{myDocument}" /> |
Type | Function | Description |
---|---|---|
org.nuxeo.ecm.platform.forms.layout.api.WidgetTypeDefinition | widgetTypeDefinition(java.lang.String) | Returns the widget type definition for given widget type id. Available since 5.4.0. |
java.lang.String | fieldDefinitionsAsString(org.nuxeo.ecm.platform.forms.layout.api.FieldDefinition[]) | Returns the list of property names for each of the field definitions, separated by a space. |
java.util.List | selectedRows(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List, boolean) | Returns the list of LayoutRow instances that are selected given the Layout instance, the list of row names selected, and a boolean that, if set to true, will include rows that are marked as always selected. |
java.util.List | selectedColumns(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List, boolean) | Alias to the nxl:selectRows function. |
java.util.List | notSelectedRows(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List, boolean) | Returns the list of LayoutRow instances that are not selected given the Layout instance and the list of row names selected. |
java.util.List | notSelectedColumns(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List) | Alias to the nxl:notSelectedRows function. |
java.util.List | defaultSelectedRowNames(org.nuxeo.ecm.platform.forms.layout.api.Layout, boolean) | Returns the list of row names that are marked as selected by default given the Layout instance and a boolean that, if set to true, will include rows that are marked as always selected. |
java.util.List | defaultSelectedColumnNames(org.nuxeo.ecm.platform.forms.layout.api.Layout, boolean) | Alias to the nxl:defaultSelectedRowNames function. |
boolean | isBoundToEditMode(java.lang.String) | Returns true if given layout mode should be mapped to the 'edit' mode for widgets in the layout. Available since 5.4.0. |
boolean | isLikePlainMode(java.lang.String) | Returns true if given widget mode should be considered as 'plain', for instance when rendering values for CSV export. Available since 5.4.2. |
boolean | isLikeViewMode(java.lang.String) | Returns true if given widget mode should be considered as 'view' (old default mode), e.g. non-null mode, and none of edit, pdf, plain modes. Available since 5.4.2 |
java.lang.String | getWidgetModeFromLayoutMode(java.lang.String) | Returns the resolved widget mode for current layout mode. Available since 8.1. |
java.lang.String | joinReRender(java.lang.String, java.lang.String) | Joins two strings to generate a valid reRender attribute for ajax components. Available since 5.7, deprecated since 5.9.5: use nxu:joinRender instead. |
Output generated by Vdldoc View Declaration Language Documentation Generator.