Tag that perform edition of a list of items.
It only deals with lists or arrays of serializable objects.
This tags puts a model in the request which can be accessed to get information about each list item value.
This tags adds and removes elements in the list using JavaScript functions. Available since 7.2.
Example:<nxu:jsInputList value="#{currentDocument.files.files}" id="myId" model="model" diff="true" template="#{nxd:defaultValue('files', 'files')}"> <h:panelGrid columns="2"> <h:inputHidden> <f:passThroughAttribute name="name" value="myFormId:myId:#{isListTemplate ? 'TEMPLATE_INDEX_MARKER:': ''}rowIndex[]" /> <f:attribute name="value" value="#{isListTemplate ? 'TEMPLATE_INDEX_MARKER' : model.rowIndex}"/> </h:inputHidden> <h:panelGroup> <a href="#" class="deleteBtn" onclick="return nuxeo.utils.deleteFromList(jQuery(this).closest('.listItem'))" /> <a href="#" class="moveUpBtn" onclick="return nuxeo.utils.moveUpList(jQuery(this).closest('.listItem'))" /> <a href="#" class="moveDownBtn" onclick="return nuxeo.utils.moveDownList(jQuery(this).closest('.listItem'))" /> </h:panelGroup> <h:panelGroup> <table> <tbody> <tr> <td class="fieldColumn"> <h:inputText value="#{model.rowData} /> </td> </tr> </tbody> </table> </h:panelGroup> </h:panelGrid> </nxu:jsInputList> <a id="myId_add" href="#nogo" onclick="return nuxeo.utils.addFromListTemplate('myForm:myId', jQuery(this).prev());"> <h:outputText value="#{messages['command.add']}" /> </a>
Info | Value |
---|---|
Component Type |
org.nuxeo.ecm.platform.ui.web.component.list.UIJavascriptList
|
Handler Class |
org.nuxeo.ecm.platform.ui.web.binding.alias.AliasAnchorComponentHandler
|
Renderer Type | None |
Description | None |
Name | Required | Type | Description |
---|---|---|---|
value | false | javax.el.ValueExpression
(must evaluate to java.util.List )
| Value binding representing the list to edit |
defaultValue | false | javax.el.ValueExpression
(must evaluate to java.util.List )
| Value binding representing the default value for the list to edit. This is only resolved when the value attribute resolves to a null or empty value, and can be useful to set default values from the interface, without having to resolve them in the original value binding method. |
id | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
rendered | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
| Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. |
required | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
| Flag indicating that the user is required to provide a submitted value for the list. WARNING: when setting the "diff" attribute to true, this flag will have no effect. |
model | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
String. The name of a request-scope attribute under which the data model will be exposed. The data model handles current index, it gives access to informations about the current item. For instance, following value bindings can be used inside the tag:
|
diff | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
| Boolean (default value: false) indicating whether a diff (instead of the whole new list) should be set when updating the model after validation. This is useful when managing large lists. Note that if the list is set on a document model, the document should be saved in repository after updating the model, so that the whole list is refetched correctly. Note also that no validation error will occur if the component is required. |
removeEmpty | false | javax.el.ValueExpression
(must evaluate to java.lang.Boolean )
| Boolean (default value: false) indicating whether empty values (null or equal to template) should be removed from the list when saving. |
number | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Integer (default value: null) indicating the number of rows that should be presented by default in edit mode. These rows are added when the editable model is built. |
template | false | javax.el.ValueExpression
(must evaluate to java.lang.Object )
| Object representing the default value to add to the list. When using a document model, you can use the function nxd:defaultValue(schemaName, fieldName) to get the default value for this complex type. |
Output generated by Vdldoc View Declaration Language Documentation Generator.