We need you!

Icon

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

Versions Compared

Key

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

...

To use this panel, list it in the install file with the class name UserInputPanel. In addition, you must write a XML specification and add it to the install resources. The name of this resource must be userInputSpec.xml.

Code Block
languagehtml/xml
<resources>
    <res id="userInputSpec.xml" src="user_input_spec.xml" parse="yes" type="xml"/>
</resources>
...
<panels>
...
    <panel classname="UserInputPanel" id="userinputpanel.orderpanel1"/>
...
</panels>

A UserInputPanel can be highly dynamic from IzPack 4.3 on, as it will be refreshed every time the user input changes and will be rendered based on conditions. For instance, it would be possible to enable or disable some more options by clicking a checkbox.

...

  • Text
  • Combo Box
  • Radio Buttons
  • Check Box
  • Password
  • File
  • Multiple files
  • Directory
  • Rule Input Field
  • Search Field
  • Custom

Additionally visual elements can be added using the following types:

...

The top level XML section is called <userInput>. For most panels it does not make sense to present them more than once, however you might want to present multiple user input panels -with different content of course. Therefore the <userInput> section can contain multiple tags that each specify the details for one panel instance.

The <panel> Element

The tag name for this is <panel>The <panel> tag uses the following attributes:

Name

Required

Description

Values

id

yes

This is the id of the user input panel for which this specification should be used. This id links to the panel specification in the install.xml file.

String Value

layout

no

Sets the alignment of fields used in the panelThere are three general layout rules this panel uses, they are left, center and right. While i think left is most commonly used, you might want to experiment with this attribute and see which you like best. The default is left.

left, center, right default: left

border

no

Normally the user input is shown with a small border. To prevent this border set this attribute to false.

true, false default: true

column_width

no

This can be used to set the column width of the two column layout. This value is in percent of the whole size. If it is set to 0, which is the default, the with will be set automatically. It it is set to 50 the gap between the left and right column is in the middle of the panel. This makes it possible to make a centered layout.

0-100 percent default: 0

summaryKeynoId of a string that represents what header name to display in the SummaryPanel of the UserInputPanel. This attribute must be defined if you would like to summarize the UserInputPanel. Note that you will have to add the summaryKey attribute to the fields you would like those to show up in the SummaryPanel as well.String Value

Each panel can have a number of visible elements, fields.

Nested Elements

NameRequiredDescriptionValues
createForPacknoIf this tag is present the appropriate user input panel gets activated just if the mentioned pack is selected by the user in the PacksPanel.Valid pack names, see PacksPanel.
createForUnselectedPacknoIf this tag is present the appropriate user input panel gets activated just if the mentioned pack is selected by the user in the PacksPanel .Valid pack names, see PacksPanel.
osnoOperating system-specific constraints.Valid OS constraints, see OS Restrictions.

 

Internationalization

To provide internationalization you can create a file named userInputLang.xml_xyz where xyz is the ISO3 code of the language in lowercase. Please be aware that case is significant. This file has to be inserted in the resources section of install.xml with the id and src attributes set at the name of the file.

...