We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Skip to end of metadata
Go to start of metadata

Usage

The UserPathPanel allows the user to select a path similar to the installation path. Like the installation path, this panel will allow the directory to be created if it does not already exist. It can also be pre-loaded with a path and set to only display if a certain pack is selected using the following variables:

Example

Once chosen, the IzPack variable UserPathPanelVariable is set to the user's choice.

Translations

The text for these keys is specified in language resource files as described in the section on Internationalizing resources.

Key
Default (English)
Description

UserPathPanel.headline

Target Path

The headline of the panel (the one with the white background).

GUI only: This is a standard translation for all type of graphical panels, if the <guiprefs> modifier useHeadingForSummary is set "yes".This has no effect on console installations.

UserPathPanel.summaryCaption
Installation Path

The summary caption text of the panel.

GUI only: This is a standard translation for all type of graphical panels, if the <guiprefs> modifier useHeadingForSummary is not set or different to "yes". This has no effect on console installations.

UserPathPanel.infoSelect the path: The label text above the directory edit field.
UserPathPanel.browseBrowse...The label text of the directory chooser button.
UserPathPanel.exists_warnThe directory already exists! Are you sure you want to install here and possibly overwrite existing files?Warning message if the directory specified already exists.
UserPathPanel.empty_targetYou have not specified a target location! Is this correct?Warning message given when the user has not selected a target but has pressed OK.
UserPathPanel.notwritableThis directory can not be written! Please choose another directory!Warning that IzPack can not create files in the selected location.
UserPathPanel.createdirThe target directory will be created: 
UserPathPanel.nodirThis file is not a directory! Please choose a directory! 
UserPathPanel.intro Intro text with an explanation, rarely used, is empty by default.
UserPathPanel.extendedIntro Mult-line intro text with an explanation, rarely used, not set by default.
UserPathPanel.requiredThe chosen directory should exist. 

 

Messages for the UserPathPanel can be customized by creating a custom lang pack and overriding the values (attribute values wrapped for readability): 

To change the text "Select the data path:  " to "Select the folder where My Application should store it data: ",  UserPathPanel.info should be specified in a language resource file for each language supported.

 

install.xml

 

<resources>
    <res id="UserPathPanelText.xml" src="UserPathPanelText.xml"/>
    <res id="UserPathPanelText.xml_fra" src="UserPathPanelText.xml_fra"/>
</resources>

 

 

The UserPathPanelText.xml file which is the default language resource, should look something like this:

 

UserPathPanelText.xml

 

<langpack>
    <str id="UserPathPanel.info" txt="Select the folder where $APP_NAME should store its data: "/>
</langpack>

 

A similar UserPathPanelText.xml.fra file needs to be created to specify the French translation.

Configuration

The following nested configuration options are possible against the panel definition:

Parameter NameDescriptionDefault Value
mustExistWhether the path given by the user must exist before leaving the panelfalse
Example
  • No labels

2 Comments

  1. Once chosen, the IzPack variable UserPathPanelVariable is set to the user choice.

    Is this true? It was not specified in the original text.

    It is how the default is set but.....

  2. I may have added some translation keys that do not exist. Please delete the ones that are not applicable.