...
Code Block |
---|
<str id="UserPathPanel.required" txt="The chosen directory should exist."/> <str id="UserPathPanel.info" txt="Select the path: "/> <str id="UserPathPanel.browse" txt="Browse"/> <str id="UserPathPanel.exists_warn" txt="The directory already exists! Are you sure you want to install here and possibly overwrite existing files?"/> <str id="UserPathPanel.empty_target" txt="You have not specified a target location! Is this correct?"/> <str id="UserPathPanel.createdir" txt="The target directory will be created: " /> <str id="UserPathPanel.nodir" txt="This file is not a directory! Please choose a directory!"/> <str id="UserPathPanel.notwritable" txt="This directory can not be written! Please choose another directory!"/> |
LoadPropertiesPanel
Warning |
---|
This section is outdated and no longer valid at least for IzPack 4.3. |
This panel is a non-visible panel. It simply loads values from a properties file specified by the variable load.properties.file
and sets them to their respective variables. The panel is designed to allow loading and setting variable values from an external resource at runtime. This maybe useful when values are unknown when the installer is built.
The load.properties.file
variable is expected to be set before the panel is activated. For instance, the variable maybe specified through a file field on a UserInputPanel
displayed prior to the LoadPropertiesPanel
. Nothing is loaded if the variable is not set when the panel is activated.
An example use case for this panel would be an installer for an enterprise application deployed in multiple environments (e.g. UAT, Production, etc.) with each deployment requiring many environment-specific settings such as database information, application URL, etc. While several UserInputPanel
instances can be used to prompt the user for data, it maybe impossible to set suitable default values for each different environments at the installer build time. Furthermore, it would be inconvenient and error-prone to have the user manually input all values into the panels.
One solution would be to have environment-specific properties files-external to the installer-for each environment. During installation, the user can then specify the path to the properties file on a UserInputPanel
(which sets the load.properties.file
variable) then have the values loaded by a LoadPropertiesPanel
. The loaded values can be used to set the default values in another UserInputPanel
for the user to inspect and modify, if required. Example:
install.xml:
Code Block |
---|
(...) <resources> (...) <res src="resource/user_input_spec.xml" id="userInputSpec.xml" parse="yes" type="xml"/> (...) </resources> (...) <panels> (...) <panel classname="UserInputPanel" id="userinputpanel.0"/> <panel classname="LoadPropertiesPanel" id="loadpropertiespanel"/> <panel classname="UserInputPanel" id="userinputpanel.1"/> (...) </panels> |
...