...
so that you can fill a combobox with data on a simple way.
NotEmptyValidator
...
The NotEmptyValidator simply checks that the user entered a non-null value into each subfield, and returns false otherwise.
RegularExpressionValidator
...
The RegularExpressionValidator checks that the user entered a value which matches a specified regular expression, as accepted by the Jakarta Regexp library (http://jakarta.apache.org/regexp/). The syntax of this implementation is described in the javadoc of the RE class (http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html).
...
You can test your own regular expressions using the handy applet at http://jakarta.apache.org/regexp/applet.html.
PasswordEqualityValidator
...
This validator uses a password field specification to compare the values in each field for equality. Normally, this would be to ensure a password was typed correctly before any other validation takes place.
| Code Block |
|---|
<field type="password" align="left" variable="the.password">
<spec>
<pwd txt="The Password:" size="25" set=""/>
<pwd txt="Retype Password:" size="25" set=""/>
</spec>
<validator class="com.izforge.izpack.panels.userinput.validator.PasswordEqualityValidator"
txt="Both passwords must match." id="lang pack key for the error text"/>
</field> |
PasswordKeystoreValidator
...
This validator uses the password field and parameters you send in from previous user input or predefined properties to open a keystore and optionally try to get a specified key.
...
| Code Block |
|---|
<field type="password" align="left" variable="keystore.password">
<spec>
<pwd txt="Keystore Password:" size="25" set=""/>
<pwd txt="Retype Password:" size="25" set=""/>
</spec>
<validator class="com.izforge.izpack.panels.userinput.validator.PasswordEqualityValidator"
txt="Both keystore passwords must match." id="key for the error text"/>
<validator class="com.izforge.izpack.panels.userinput.validator.PasswordKeystoreValidator"
txt="Could not validate keystore with password and alias provided." id="key for the error text">
<param name="keystoreFile" value="${ssl.keystore}"/>
<param name="keystoreType" value="${ssl.keystore.type}"/>
<param name="keystoreAlias" value="${keystore.key.alias}"/>
<param name="skipValidation" value="${skip.keystore.validation}"/>
</validator>
</field> |
Creation Your Own Custom Validator
...
You can create your own custom Validator implementation simply by creating a new class which implements the com.izforge.izpack.panels.userinput.validator.Validator interface. This interface specifies a single method: validate(ProcessingClient client) , which returns a boolean value. You can retrieve the value entered by the user by casting the input ProcessingClient as a RuleInputField and calling the RuleInputField.getText() method. You can also retrieve any parameters to your custom Validator by calling the RuleInputField.getValidatorParams() which returns a java.util.Map object containing parameter names mapped to parameter values. For an example, take a look at com.izforge.izpack.panels.userinput.validator.RegularExpressionValidator.
...
The class name is an optional value. The class must implement the Processor interface.
Processing the Field Content
...
This feature needs to be documented.
Summary Example
...
| Code Block |
|---|
<field type="rule" variable="test1">
<description align="left" txt="A description for a rule input
field."
id="description.rule.1"/>
<spec txt="Please enter your phone number:"
layout="( N:3:3 ) N:3:3 - N:4:4 x N:5:5"
resultFormat="specialSeparator" separator="."/>
<validator class="com.izforge.izpack.panels.userinput.validator.NotEmptyValidator"
txt="The phone number is mandatory!" />
<!--processor class=""/-->
</field> |
Search
...
The search input field allows the user to choose the location of files or directories. It also supports auto-detection of the location using a list of suggestions. The field is basically a combobox with an extra button to trigger auto-detection (again).

Specification
...
The <description> tag is the same as with other fields
...