[izpack-users] Flagging empty variables

Klaus Bartz bartzkau at gmx.net
Thu Mar 16 18:46:21 CET 2006


Hi Laurent,

Am 15.03.2006, 21:19 Uhr, schrieb Laurent Duperval <lduperval at gmail.com>:

> HI,
>
> Is there a way to warn a user that she/he has left a value empty on a
> screen? We've had a couple of instances where an installation was
> completed without entering a value everywhere and that causes issues
> in our application.

good pratice is to verify all input. At UserInputPanel there are
validators (I do not know more...).
If you use custom panels, it is in your hand. All panels can have the  
method
isValidated which will be called after the installer has pushed <next>  
button.
There you have to do your validation.
E.g. see the JDKPathPanel. It presents an "ask question box" if e.g. the
version of the given JDK is not OK.

>
> Can I have a popup appear or can I display empty values in ALL CAPS
> AND RED in the summary screen?
>
Good idea. At implementation not thought about it, but simple possible.
The SummaryPanel uses HTML. Therefore surround the return value with
a color tag like
     public String getSummaryBody()
     {
         return ("<font color=\"#ff0000\">" + myContents + "</font>");
     }
and it will be placed with red color.

> On a similar note: we need to be able to display on the summary page
> whether a password entered was empty or not, without displaying the
> actual password. Is this feasible?

That's depends on the panel which consume the password. The summary panel
calls the method getSummaryBody() of all panels. The String which will be
returned by this method will be placed in the panel. If a MyPasswordPanel
returns ***** this will be written in the summary panel.

>
> Thanks,
>
> L

Cheers

Klaus

> _______________________________________________
> izpack-users mailing list
> izpack-users at lists.berlios.de
> http://lists.berlios.de/mailman/listinfo/izpack-users
>



-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/



More information about the izpack-users mailing list