When you need to capture user input that will be available to your installer then you need to use the UserInputPanel.
This panel allows you to prompt the user for data that you can use later in the installation process.
...
Code Block |
---|
<izpack:userinput version="5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:izpack="http://izpack.org/schema/userinput" xsi:schemaLocation="http://izpack.org/schema/userinput http://izpack.org/schema/5.0/izpack-userinput-5.0.xsd"> <panel id="proxypanelpanel1"> <field type="staticText" align="left" txt="Enter the Information required to connect to your proxy" id="input.title"/> <field type="text" variable="proxyaddress"> <spec txt="Proxy Host:" id="input.proxy" size="25" set=""/> </field> <field type="text" variable="proxyPort"> <spec txt="Proxy Port:" id="input.port" size="6" set=""/> </field> <field type="text" variable="proxyUsername"> <spec txt="Proxy Username:" id="input.username" size="20" set=""/> </field> <field type="password" variable="proxyPassword"> <spec> <pwd txt="Proxy Password:" size="20" set=""/> </spec> </field> </panel> </izpack:userinput> |
...
Name | Required | Description | Values | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 | |||||||||
| no | Sets the alignment of fields used in the panelThere are three general layout rules this panel uses, they are | left, center, right default: left | |||||||||
| no | Normally the user input is shown with a small border. To prevent this border set this attribute to | true, false default: true | |||||||||
| 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-100 percent default: 0 | |||||||||
summaryKey | no | Id 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 information about the user input in this panel in the SummaryPanel.. 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 | |||||||||
readonly | no | The
| true, false default: false | |||||||||
readonlyCondition | no | The
| true, false default: false | |||||||||
displayHidden | no | Setting Displayed hidden fields are disabled (ie. "greyed out") . But if the condition of the panel evaluates to false, display all fields on the panel just as disabled instead of hiding it.
| true, false default: false | |||||||||
displayHiddenCondition | no | The
| true, false default: false | |||||||||
rigid | no | When set to "true", the topBuffer will represent a number of pixels rather than a percentage. | true, false default: false | |||||||||
topBuffer | no | Represents the percentage of leftover vertical space to place on top of the components. Setting | Integer default: 25 |
Nested Elements
Name | Required | Description | Values |
---|---|---|---|
createForPack | no | If 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. |
createForUnselectedPack | no | If this tag is present the appropriate user input panel gets activated only if the mentioned pack is not selected by the user in the PacksPanel . | Valid pack names, see PacksPanel. |
os | no | Operating system-specific constraints. | Valid OS constraints, see OS Restrictions. |
field | no | One or more user input field definitions, described on the page Fields. | Valid user input field definitions, see Fields for more information. |
...
Internationalization
To provide internationalization, you 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.
...