...
Attribute | Usage | Required | Default Value |
---|---|---|---|
variable | Defines the variable that will hold the number of rows submitted. | Yes | |
| Defines the minimum amount of rows that must be displayed. This value should be less than or equal to the value in maxRow. | No | 1 |
| Defines the maximum amount of rows that must be displayed. | No | 5 |
| If the condition evaluates to show this field, otherwise hide this field. | No | Evaluates to true if undefined |
Note |
---|
Currently, neither validators nor processors nested to each single 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.UniqueValidator | Validate 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 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.
...