[izpack-users] How to use Password field in the UserInputPanel?

miraodb miraodb at hotmail.com
Thu Mar 16 23:46:05 CET 2006


Hi,

Welcome !
Here it is, it's pretty simple.
In userinput.xml add this:

<field type="password" variable="PWD">
   <description align="left" txt="" id="description11.text"/>
      <spec>
    <pwd txt="-> Type the password for the connection:" id="pwd.label" size="10" set=""/>
    <pwd txt="-> Retype the password for the connection:" id="pwd.label2" size="10" set=""/>
   </spec>
   <validator class="com.izforge.izpack.sample.PWDValidator" txt="Both versions of the password must match" id="error.label"/>
  </field>

This will show two password fields with stars as you enter the text...
You can see that there's a validator which will check that both password matches. If you want to use that you need to add a jar to the install.xml as follows:

<jar src="pwdcheck.jar" stage="install" />

this pwdcheck.jar can be obtained by a simple jar command from the izpack-src\src\lib folder.
Use the bat or sh file depending on your OS as follows:
createPWD.bat pwdcheck.jar

Then copy this jar to the root of your installation folder or to any relativepath which means that you should change 
<jar src="pwdcheck.jar" stage="install" />
into this:
<jar src="yourpath/pwdcheck.jar" stage="install" />

I can also send you the jar if needed... but it's really easy to do ;-)

Hope this helps,
fabrice

  ----- Original Message ----- 
  From: sagar shah 
  To: izpack-users at lists.berlios.de 
  Sent: Thursday, March 16, 2006 5:53 AM
  Subject: [izpack-users] How to use Password field in the UserInputPanel?


  Hi All,
  I am new to this list. I am trying to explore the powerful and easy to understand IzPack. I want use a text field in the UserInputPanel which asks for password. But i dont want the password to be displayed as it is entered. It should be like a normal password fields. But the actual password is to be substituted in one of the conf file of my application. 
  Please help me out, how can i go about this?
  Thanking in advance.
  -- 
  Regards,
  Sagar Shah.
  email : sagarbs at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060316/46434dfc/attachment.html 


More information about the izpack-users mailing list