This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Get User Input
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2007
06:11 AM
Get User Input
Hi all,
I'd like to validate text input from user, the length of a key for example. Is there a way to do it from InstallAnywhere directly or should I implement a custom panel?
Thanks in advance.
Gennaro
I'd like to validate text input from user, the length of a key for example. Is there a way to do it from InstallAnywhere directly or should I implement a custom panel?
Thanks in advance.
Gennaro
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2007
10:37 AM
You are using IA 2008 or an earlier version?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2007
02:47 PM
You can use a custom panel if you want to.
You should also be able to evaluate a rule after your original panel with either a custom rule or a regular expression.
You should also be able to evaluate a rule after your original panel with either a custom rule or a regular expression.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2007
02:13 AM
I'm using IA 2008.
I've implemented a custom panel but I'm not able to add action listener (is it possible???) to the Next button of Installer Frame.
I tried to add a jButton to custom panel and I can get the input text from the user correctly... So, how can I add a listener to default Next button?
Thanks
I've implemented a custom panel but I'm not able to add action listener (is it possible???) to the Next button of Installer Frame.
I tried to add a jButton to custom panel and I can get the input text from the user correctly... So, how can I add a listener to default Next button?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2007
04:47 AM
Yes you can:
Best Regards,
Yves
Container guiContainer = ((GUIAccess) ccpp.getService(GUIAccess.class)).getFrame();
if (guiContainer instanceof JFrame) {
guiContainer = (Container) ((JFrame) guiContainer).getContentPane().getComponent(0);
JButton guiJButton = (JButton) ((Container) guiContainer.getComponent(3)).getComponent(2);
guiJButton.addActionListener(new NextListener(guiContainer));
}
Best Regards,
Yves
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2007
05:05 AM
Yves Kreis wrote:
Yes you can:Container guiContainer = ((GUIAccess) ccpp.getService(GUIAccess.class)).getFrame();
if (guiContainer instanceof JFrame) {
guiContainer = (Container) ((JFrame) guiContainer).getContentPane().getComponent(0);
JButton guiJButton = (JButton) ((Container) guiContainer.getComponent(3)).getComponent(2);
guiJButton.addActionListener(new NextListener(guiContainer));
}
Best Regards,
Yves
Ok, in which method should I put this code? And should I create a new NextListener class?
Thanks for your help!
Gennaro
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 19, 2007
10:15 AM
When do you want to validate your text entry? I find it much easier to validate when the user clicks next. I put the validation code in the okToContinue() method of the CustomCodePanel. Then if the input is incorrect, I display a dialog explaining and have that method return false and make the user try again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2007
04:32 AM
purcellk24 wrote:
When do you want to validate your text entry? I find it much easier to validate when the user clicks next. I put the validation code in the okToContinue() method of the CustomCodePanel. Then if the input is incorrect, I display a dialog explaining and have that method return false and make the user try again.
Thanks a lot... It works correctly!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 30, 2008
02:32 AM
i tried the same thing to get the user input..
i have:
1)custom panel with oktocontinue method.. which checks the correctness of input.. and set the $var$ variable true/false..
2) then according to $var$.. i display error message dialog saying input is wrong 3)But after message appears and user clicks OK.. Just blank white screen comes without anything in it.. (the panel is not refreshed somehow 😞 )
But if i minimize and then maximize the installer window .. it appears again !..
please help !
thank you
i have:
1)custom panel with oktocontinue method.. which checks the correctness of input.. and set the $var$ variable true/false..
2) then according to $var$.. i display error message dialog saying input is wrong 3)But after message appears and user clicks OK.. Just blank white screen comes without anything in it.. (the panel is not refreshed somehow 😞 )
But if i minimize and then maximize the installer window .. it appears again !..
please help !
thank you