Hi All,
I am new to Izpack and I am trying to use the UserInputPanel to get certain information from the user, like whether tomcat is installed already. I am using Izpack 4.3.3
If tomcat was installed already I am trying to dynamically update a text and trying to get the installation location.
But the text to be displayed doesn’t get updated irrespective of user’s selection. I am using revalidate="yes" flag for the radio button choices and a conditionid for the controls to be dynamically displayed.
Please find below the contents of a very basic install.xml and UserInputSpec.xml.
UserInputSpec.xml:
<userInput>
<panel order="0" topBuffer="0">
<field type="staticText" align="left"
txt="staticText.text" id="Please select from one of the following options:"/>
<field type="radio" variable="tomcat" >
<description align="left" txt="This is a description for radio buttons"
id="tomcat.text"/>
<spec>
<choice txt="Tomcat-6 installed already"
id="tomcat.installed" value="installed" revalidate="yes" />
<choice txt="Tomcat not installed"
id="tomcat.not_installed" value="not_installed" set="true" revalidate="yes" />
</spec>
</field>
<field type="divider" align="center"/>
<!--<conditions>
<condition type="variable" id="condn_inst">
<name>installed</name>
<value>inst</value>
</condition>
<condition type="variable" id="condn_not_inst">
<name>not_installed</name>
<value>ninst</value>
</condition>
</conditions>-->
<conditions>
<condition type="variable" id="not_installed">
<name>tomcat.not_installed</name>
<value>not_installed</value>
</condition>
<condition type="variable" id="installed">
<name>tomcat.installed</name>
<value>installed</value>
</condition>
</conditions>
<field type="staticText" align="left" conditionid="not_installed"
txt="staticText.text" id="Please select the install folder for tomcat-6 installation:"/>
<field type="staticText" conditionid="installed" align="left"
txt="staticText.text" id="Please select the existing tomcat-6 install folder:"/>
<field type="dir" align="left" variable="tomcat.home" >
<spec txt="" size="25" set="" />
<!--<validator class="com.izforge.izpack.util.NotEmptyValidator" txt="You must select the directory for tomcat!"/>-->
</field>
</panel>
</userInput>
Now the install.xml:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<info>
<appname>AML Demo Installation</appname>
<appversion>1.0</appversion>
<authors>
<author name="Joe Bloggs" email="
joe.b...@test.com"/>
</authors>
<url>
http://www.anotherworld-inspace-website.net/</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
<langpack iso3="fra"/>
</locale>
<resources>
<res id="LicencePanel.licence" src="Licence.txt"/>
<res id="InfoPanel.info" src="Readme.txt"/>
<res id="userInputSpec.xml" src="UserInputSpec.xml"/>
</resources>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="UserInputPanel"/>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
<packs>
<pack name="Tomcat Server" required="yes">
<description>Tomcat files</description>
<file src="Readme.txt" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
2. Also I would like to pass the user selected input whether the tomcat has been installed or not to the next panel - InstallPanel, which I am not sure as well.
Please help me to identify the issues. I have spent nearly 2 days now, but didn't get any where. I am so desperate, please help me.
Any help would be highly appreciated.
Thanks in advance,
Latha
Start searching NOW!
Search for properties that match your lifestyle!