Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Attribute

Usage

RequiredDefault Value
variableDefines the variable that will hold the number of rows submitted.Yes 

minRow

Defines the minimum amount of rows that must be displayed.
This value should be less than or equal to the value in maxRow.
No1

maxRow

Defines the maximum amount of rows that must be displayed.
This value should be greater than or equal to the value in minRow.

No5

conditionid

If the condition evaluates to show this field, otherwise hide this field.NoEvaluates to true if undefined

 

 

 

Note

Currently, neither validators nor processors nested to each single <field> element can be used. They will be ignored.

You can just use a per-column validator validating a comma-separated input like described above.

 

Validators

Attribute

Usage

com.izforge.izpack.panels.userinput.validator.UniqueValidatorValidate that all values in a column are unique

If you are making your own column validator have a look at the source for UniqueValidator. You will realize that the values come in as a comma separated string.

Note

Currently, neither validators nor processors nested to each single <field> element can be used. They will be ignored.

You can just use a per-column validator validating a comma-separated input like described aboveThe UniqueValidator has been made especially for validations in the Custom Input Field. It has no reasonable appliance for other input field types.

Example

In the example below we define a custom field that that has three columns and atleast one row. The user may add up to three rows.
The first column will contain a combo box to select one or more creature types. It also validates that the selected creatures must be unique. (Ex. Mew cannot be chosen twice)
If creatures Mew and Pikachu were selected, it would be saved in creature.type.1 and creature.type.2 respectively.
The second column is similar to the first column except this combo box allows you to select a colour for your creature.
The third column specifies a text field for the user to submit a name for the selected creature. For each individual text field it validates that it is not empty.

...