Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Under construction!

 

A custom User Input Panel is an xml file named userInputSpec.xml.

More information

Step 1 - Introduce the custom panel

To use a custom user input panel you have to add the following xml code to the install.xml:

Code Block
themeEclipse
languagehtml/xml
<panels>
	...
	<panel classname="UserInputPanel"/>
	...
</panels>

Put the panel tag in the right order of your panels defined in the panels tag. Now specify the location of the userInputSpec.xml in the resources tag of the instal.xml.

Code Block
themeEclipse
languagehtml/xml
<resources>
	...	
	<res id="userInputSpec.xml" src="userInputSpec.xml" />
	...
<resources>

 

Step 2 - userInputSpec.xml skeleton

Code Block
themeEclipse
languagehtml/xml
<userInput>
    <panel order="0" layout="left">
        <field type="text" variable="value1">
            ...
        </field>
    </panel>
</userInput>

This xml code should be put in the userInputSpec.xml file. This is the skeleton description of a custom user input panel.

XML TagDescription
<userInput>
Root xml tag
<panel>
Definition of a panel; Multiple panels possible
<field>

Definiton of a gui element; One gui element per <field > tag

 

Step 3 - Supported gui elements

The following description should be considered as an introduction of available gui elements of IzPack. Detailed information can be found in the official (but an old) IzPack documentation.

User Input Elements

ElementCodeScreenshot
Text Input
Code Block
themeEclipse
languagehtml/xml
<field type="text" variable="textInput">
  <description align="left" txt="A description for a text input field"
      id="description.text"/>
  <spec txt="Enter some text:" id="text.label" size="15" set="some text"/>
</field>
Image Added
Combo Box
Code Block
themeEclipse
languagehtml/xml
<field type="combo" variable="radioSelection">
  <description align="left" txt="This is a description for radio buttons"
            id="description.radio"/>
  <spec>
          <choice txt="the first choice" id="radio.label.1" value="1 selected" />
          <choice txt="the second choice" id="radio.label.2" value="2 selected" set="true" />
          <choice txt="the third choice" id="radio.label.3" value="3 selected" />
          <choice txt="the fourth choice" id="radio.label.4" value="4 selected" />
  </spec>
Image Added
Radio Buttons
Code Block
themeEclipse
languagehtml/xml
<field type="radio" variable="radioSelection">
  <description align="left" txt="This is a description for radio buttons"
            id="description.radio"/>
  <spec>
          <choice txt="the first choice" id="radio.label.1" value="1 selected" />
          <choice txt="the second choice" id="radio.label.2" value="2 selected" set="true" />
          <choice txt="the third choice" id="radio.label.3" value="3 selected" />
          <choice txt="the fourth choice" id="radio.label.4" value="4 selected" />
  </spec>
</field>
Image Added
Check Box
Code Block
themeEclipse
languagehtml/xml
 <field type="check" variable="checkSelection.1">
  <description align="left" txt="This is a description for a check box"
            id="description.check.1"/>
  <spec txt="check box 1" id="check.label.1" true="on" false="off"
      set="false"/>
</field>
Image Added
Password
Code Block
themeEclipse
languagehtml/xml
<field type="password" align="left" variable="the.password">
  <spec>
    <pwd txt="The Password:" size="25" set=""/>
    <pwd txt="Retype Password:" size="25" set=""/>
  </spec>
</field>
Image Added
File
Code Block
themeEclipse
languagehtml/xml
<field type="file" align="left" variable="the.file">
  <spec txt="" size="25" set=""/>
</field>
Code Block
themeEclipse
languagehtml/xml
<field type="staticText" align="left" txt="Existing SSL keystore to import:"/>
 <field type="file" align="left" variable="existing.ssl.keystore">
   <spec txt="" size="25" set="$myconfig" />
 </field>

 

 

Image Added

Image Added

Multiple filessee documentation. 
Directory
Code Block
themeEclipse
languagehtml/xml
<field type="dir" align="left" variable="existing.jboss.home">
  <spec txt="" size="25" set="$INSTALL_PATH$FILE_SEPARATOR${jboss.version}" mustExist="false" />
</field>
Image Added
Rule Input Fieldsee documentation 
Search Field
Code Block
themeEclipse
languagehtml/xml
<field type="search" variable="java_sdk_home">
  <description align="left"
               txt="This is a description for a search input field."
               id="description.java_sdk_home"/>
  <spec txt="Path to Java Compiler:" checkfilename="/bin/javac"
        type="file" result="directory">
  </spec>
</field>
Image Added

 

Visual Elements

ElementCodeScreenshot
Static Text
Code Block
themeEclipse
languagehtml/xml
<field type="staticText" align="left"
       txt="This is just some simple static text with variable substitution in here: $myvariable."
       id="staticText.text"/>
Image Added
Title
Code Block
themeEclipse
languagehtml/xml
<field type="title" txt="This is my title" id="mytitle"/>
Image Added
Space
Code Block
themeEclipse
languagehtml/xml
<field type="space" />
 
Divider
Code Block
themeEclipse
languagehtml/xml
<field type="divider" />
Image Added