nxu
Tag inputList


Tag to perform complex editions over 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.


Example:
<p> Examples make extensive use of ajax4jsf so that validation of other components that may be on the page does not occur while adding and deleting items in the list. </p> <a4j:region renderRegionOnly="false"> <a4j:outputPanel ajaxRendered="true"> <nxu:inputList value="#{currentDocument.files.files}" id="files" model="model" diff="true" template="#{nxd:defaultValue('files', 'files')}"> <h:panelGrid columns="2"> <a4j:commandLink immediate="true" actionListener="#{editableListBean.performAction}" reRender="fichiers" bypassUpdates="true"> <h:graphicImage value="/icons/delete.png" /> <f:param name="for" value="fichiers" /> <f:param name="index" value="#{model.rowIndex}" /> <f:param name="type" value="remove" /> </a4j:commandLink> <h:panelGroup> <nxu:inputFile value="#{model.rowData.file}" filename="#{model.rowData.fileName}" editFilename="false" id="file" /> <h:message for="file" /> </h:panelGroup> </h:panelGrid> </nxu:inputList> </a4j:outputPanel> <a4j:commandLink immediate="true" actionListener="#{editableListBean.performAction}" reRender="fichiers"> <h:graphicImage value="/icons/action_add.gif" /> <f:param name="for" value="fichiers" /> <f:param name="type" value="add" /> </a4j:commandLink> </a4j:region>


Tag Information
Tag ClassNone
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
valuefalsefalsejava.util.ListValue binding representing the list to edit
defaultValuefalsefalsejava.util.ListValue 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. Available since 5.4.
idfalsefalsejava.lang.StringThe component identifier for this component. This value must be unique within the closest parent component that is a naming container.
renderedfalsefalsejava.lang.StringFlag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
requiredfalsefalsejava.lang.StringFlag 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.
modelfalsefalsejava.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:

  • #{model.rowCount}: size of the model.
  • #{model.rowData}: current item of the list (changes while iterating).
  • #{model.rowIndex}: current index integer.
  • #{model.rowNew}: boolean indicating if this row was already present in the original list.
difffalsefalsejava.lang.StringBoolean (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.
removeEmptyfalsefalsejava.lang.StringBoolean (default value: false) indicating whether empty values (null or equal to template) should be removed from the list when saving.
numberfalsefalsejava.lang.StringInteger (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.
templatefalsefalsejava.lang.StringObject 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 thiss complex type.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.