View Full Version : Custom Destination Panel

04-28-2003, 10:48 AM

I'm developing a custom destination panel by extending DestinationPanel. I'm just overriding the queryExit() method and displaying an error dialog to the user if the user specified directory name has a space in it. The question is: How do I get the user specified directory name?

I can't use resolveString("$P(absoluteInstallLocation")) because it is set after the panel is exited.

Please help ... !!!

04-28-2003, 03:09 PM
I'm attaching code for the workaround ... It works only in the case of a Swing or AWT UI installer. I basically search the entire component tree until I find either a JTextField or TextField and then get the contents of that field. Let me know if I'm doing anything wrong in this code...

Basically, the custom destination panel checks to see whether the user entered directory name contains any spaces. If so, an error dialog is displayed and the user is asked to re-enter a valid directory name.

04-28-2003, 03:24 PM
I was working on the same thing. The way I got
this to work was in my
queryExit(WizardBeanEvent event) method, I first
called the exited(event) method. After that I was
able to call resolveString("$P(installLocation)")
and get the current location.

04-28-2003, 03:31 PM
I think calling the exited() method manually will cause problems. I was able to get it to work with the code that I attached in my first reply. Check it out and see if that works for you.

04-28-2003, 03:58 PM
Do you know what problems the method I suggested will cause? I haven't run into any problems and this method works for the console mode as well (which is important to me).

In looking at the DestinationPanel code, the exited method is just updating the Product Tree.

Check it out... maybe it will work for you.

05-05-2003, 10:17 AM
I found a solution without custom beans. (for beginners)

1. Destination Panel
2. Text Display Panel ("Please Re-enter....")
3. Goto Panel (to Destination Panel)

The second and third Panel use a StringComparison Condition.
Regular Expression '.* .*' must be met in $P(installLocation).