Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: details documented

...

It evaluates all conditions which ID start with "conditionvalidator". In case one of them evaluates to false the panel switching is prevented in graphical mode. In text mode the installation is aborted instead.

Code Block
languagehtml/xml
titleData Validator Example
<conditions>
    <condition type="or" id="conditionvalidator.iscompatibleupgrade">
        <condition type="ref" refid="isNew"/>
        <condition type="ref" refid="isCompatibleUpgrade"/>
    </condition>
    ...
</conditions>

<panels>
    ...
    <panel classname="TargetPanel">
      <validator classname="com.izforge.izpack.installer.validator.ConditionValidator"/>
    </panel>
    ...
</panels>

...

Code Block
languagehtml/xml
titleinstall.xml
<resources>
    <res id="CustomLangPack.xml_eng" src="i18n/customLangPack.xml_eng"/>
    <res id="CustomLangPack.xml_deu" src="i18n/customLangPack.xml_deu"/>
    ...
</resources>

The id of the message is constructed from the id of the failing condition and the suffix ".error.message". In the example above the id will be "conditionvalidator.iscompatibleupgrade.error.message":

Code Block
titlecustomLangPack.xml_eng
<langpack>
    <str id="conditionvalidator.iscompatibleupgrade.error.message" txt="Update is not compatible with the chosen previous installation"/>
</langpack>

If no message with the appropirate id is found, the message id will be displayed instead.

<validator> - Attributes

AttributeDescriptionDefaultRequired
classname
The classname must be set to  "com.izforge.izpack.installer.validator.ConditionValidator"noneyes
condition

A valid condition ID. The ConditionValidator will be executed only, if this optional condition evaluates to true.

noneno