[izpack-users] Help needed regarding UserInputPanel error

Marc Eppelmann marc.eppelmann at gmx.de
Fri Jul 28 19:33:20 CEST 2006


Am Freitag, 28. Juli 2006 17:10 schrieb Muhammad Sufian Javed:
> Hi Marc,
>
> Thank you for your reply. Yeah, its now working after following your
> suggestion. Thanks a lot. I have another query and that is: User of my
> application during installation wizard is asked to enter user id and
> password. Now, I want password characters in the following text box field
> to be hidden (like in the case when we enter password for checking mails at
> Yahoo etc.) and displays "****" instead of actual characters when he/she
> enters the password. Is it possible? <field type ="text"
> variable="aVariable">
> <spec txt="Password:" id="text.label" size="15" set=""/>
> </field>

Yes, it is possible using the following fragment in the assigned panel:

<panel>
...
<field type="password" variable="ADMINISTRATORPASSWD">
<validator class="com.izforge.izpack.util.PWDValidator" id="The Passwords did 
not match."/>
−
	<spec size="25">
<pwd set="" size="18" id="administratorpasswd.label"/>
<pwd set="" size="18" id="administratorconfirm.label"/>
</spec>
</field>
...
</panel>

Hint:

Add the following fragments in your language specific userInputSpec_eng.xml 
for i18n of your Wizard

   <str id="The Passwords did not match." txt="The Passwords did not match."/>
    <str id="administratorpasswd.label" txt="Password (>= 5 characters)"/>
    <str id="administratorconfirm.label" txt="Password (confirmed)"/>

Hope this helps.

Cheers 
Marc


PS:
The PWDValidator Class expects IMHO only Password fields in one Panel. (I have 
not checked this...) I have an customized validator written to mix several 
input field types. I suggest also to write your own if you want this. It is 
easy. See the PWDValidator as example




More information about the izpack-users mailing list