nxl

Tag Library Information 
InfoValue
ID (tag prefix)nxl
URIhttp://nuxeo.org/nxforms/layout
Tag Summary 
TagDescription
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:

  • 'value' references the given widget value, so that it can be used in a generic template for widgets of type 'template', for instance.
  • 'widget' references the created widget.
  • widgets of type 'template' also expose field values by 'field_0' or 'field_1',... the number being the field definition index in the field definitions list.

Example:
        <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:

  • 'value' references the given widget value.
  • 'widget' references the widget. It is also referenced by 'widget_0' or 'widget_1',... the number being the widget level in the hierarchy of widgets.
  • widgets of type 'template' also expose field values by 'field_0' or 'field_1',... the number being the field definition index in the field definitions list.

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.

  • 'layout' references the computed layout.
  • 'value' or 'layoutValue' references the given value, so that it can be used in the widget properties definitions, for instance. The 'value' variable is updated to the value passed to widget tag in a widget rendering context.

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:

  • 'layoutRow' and since 5.3.1, alias 'layoutColumn' reference the current layout row or column.
  • 'layoutRowIndex' and since 5.3.1, alias 'layoutColumnIndex' reference its index in the layout list of rows/columns.

Example:
        <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:

  • 'widget' or 'widget_0' references the current widget, 0 being its level in the widgets hierarchy.
  • 'widgetIndex' references its index in the layout row list of widgets.

Example:
        <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:

  • 'widget' or 'widget_n' references the current widget, n being its level in the widgets hierarchy. For instance, the root of all widgets is always referenced as 'widget_0', while 'widget' is updated to the current sub widget value.
  • 'widgetIndex' or 'widgetIndex_n' references its index in the layout row list of widgets or in the widget list of sub widgets. It is *not* the sub widget iteration number when iterating over a list of objects.

Example:
        <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}" />
      
Function Summary 
TypeFunctionDescription
org.nuxeo.ecm.platform.forms.layout.api.WidgetTypeDefinitionwidgetTypeDefinition(java.lang.String) Returns the widget type definition for given widget type id. Available since 5.4.0.
java.lang.StringfieldDefinitionsAsString(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.ListselectedRows(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.ListselectedColumns(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List, boolean) Alias to the nxl:selectRows function.
java.util.ListnotSelectedRows(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.ListnotSelectedColumns(org.nuxeo.ecm.platform.forms.layout.api.Layout, java.util.List) Alias to the nxl:notSelectedRows function.
java.util.ListdefaultSelectedRowNames(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.ListdefaultSelectedColumnNames(org.nuxeo.ecm.platform.forms.layout.api.Layout, boolean) Alias to the nxl:defaultSelectedRowNames function.
booleanisBoundToEditMode(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.
booleanisLikePlainMode(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.
booleanisLikeViewMode(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.StringgetWidgetModeFromLayoutMode(java.lang.String) Returns the resolved widget mode for current layout mode. Available since 8.1.
java.lang.StringjoinReRender(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.