|
|
|
Description
A component used to iterate through a list of items within a
Form. The ListEdit is similar to a
Foreach but uses hidden
input fields within the <form> to store the items in the list.
An instance of
DataSqueezer is used to convert arbitrary objects into
Strings and then back into objects. However, for best efficiency,
the list should be simple Strings or numeric types, typically a
primary key or other identifier from which the rest of an object may be
retrieved or constructed.
Serializable
objects will work, but the resultant string can be very, very large.
|
See Also
Foreach,
Form,
Hidden
|
Parameters
Name |
Type |
Direction |
Required |
Default |
Description |
source |
List,
Iterator or
Object[]
|
in |
no |
|
The list of values to be editted within the form. This list is only read
when the component renders; it records hidden input fields in the form to
guide things when the form is submitted.
The source can contain objects of any type, though they should be
serializable. Ideally, the objects should be String or wrapper
types such as Integer. In other
words, the source should be a list of primary keys of the
objects being editted.
|
value |
Object |
out |
no |
|
The value for each iteration through the list (during render or rewind).
|
index |
int |
out |
no |
|
The index (starting at zero) for each iteration through the list. |
listener |
IActionListener |
in |
no |
|
A listener that is informed after the value parameter is updated. This
allows the data set operated on by the rest of the
Form components to be synchronized to the value
stored in the hidden field.
A typical use is to encode the primary
key of an entity as a Hidden; when the form is submitted, the
Hidden's listener re-reads the corresponding entity from the
database.
|
element |
String |
in |
no |
|
If specified, then a tag for the specified element is placed around the
content on each iteration. This emulates the Any
component. Most often the element specified is "tr" when the ListEdit is
part of a table. Any informal parameters are applied to the element.
|
Body: rendered Informal parameters:
allowed
Reserved
parameters: none
|
Examples
This example is under construction.
|
|