PDA

View Full Version : Setting navigation options from a custom bean



connollypaul
07-08-2002, 04:37 AM
Hey there,
i am writing a custom panel, that checks a database connection. If the connection fails, i want to disable the 'next' button, so the user is forced to change the connection details. I

connollypaul
07-08-2002, 04:39 AM
I am basically editing the test display panel so that the results of the connection can be displayed here. There is nowher in the code that the navigation details are mentioned however and i was just wondering whether i could disable the next button from within here if i couldnt connect to the database.

regards
paul

jnuzzi
07-08-2002, 07:36 AM
For information on how to disable the next button please see this thread: http://community.installshield.com/showthread.php?threadid=96007.

connollypaul
07-10-2002, 04:31 AM
with my custom bean i have the next button working, however i cant seem to update the text in the text display panel? Basically. i have two input panels followed by a text input panel. Whether the next button on the text display panel should be enabled/disabled and the text to be displayed should be based on the validation of the input panels. The problem is that the text always stays the same based on the validation the first time the panel is visited. does anyone know what i should do to update this panel everytime the panel is visited or what method i should use

regards
paul

jnuzzi
07-10-2002, 07:26 AM
I do this in the entered method of my custom panels. I check to see if I need to change something and if I do I use the following code to change the panel:

// Redraw the panel
getContentPane().removeAll();
createUI(null);

if (!isConsoleInteraction())
{
((AWTWizardUI) (getWizard().getUI())).getFrame().validate();
}

createUI will call initialize and that is where I determine what needs to be put on the panel. This works fine, except you do see the panel flicker when it redraws itself.

Jeff Dillon
07-10-2002, 08:53 AM
FYI, there is a KB article describing this process as well, Q106382. In order to access the knowledge base, please visit...

http://support.installshield.com/kb/

connollypaul
07-10-2002, 09:14 AM
Thanks james and jeff. I have the problem fixed now. I was doing something similar to both of your suggestions but not as neatly so i am gonna change mine again to your way....

thanks again

paul