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
- :
- InstallShield
- :
- InstallShield Forum
- :
- Silent Mode and Custom Dialogs
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
Jun 08, 2006
03:08 PM
Silent Mode and Custom Dialogs
Hello,
I have a really involved custom control that I have create that allows the choice of multiple product types to be chosen from a ComboBox. For each choice a Serial number can be entered (JTextbox). The client clicks an "Add" Button to initiate the check. The logic then determines validity of the serial number and set a variable that is later read by the "assembly" to decide whether or not that module gets installed.
All this is implemented within a custom control that can be dropped upon a dialog panel during designtime.
Thanks for your help, I found the answer.
I have a really involved custom control that I have create that allows the choice of multiple product types to be chosen from a ComboBox. For each choice a Serial number can be entered (JTextbox). The client clicks an "Add" Button to initiate the check. The logic then determines validity of the serial number and set a variable that is later read by the "assembly" to decide whether or not that module gets installed.
All this is implemented within a custom control that can be dropped upon a dialog panel during designtime.
Thanks for your help, I found the answer.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 08, 2006
05:10 PM
Use the generateOptionsEntries method. You will be passed an ISOptionsContext. Use this to determine if you are in template or record mode.
This is from a standard Destination panel:
[CODE] /**
* Called when panel is displayed in console mode when "options-record" or
* "options-template" command line option is used.
*/
public void generateOptionsEntriesDestination(ISOptionsContext context) {
String value = null;
String option = null;
String panelId = context.getPanel().getName();
Vector optionEntries = context.getOptionEntries();
try {
ProductService pService =
(ProductService)context.getService(ProductService.NAME);
if (context.getValueType() == WizardBean.TEMPLATE_VALUE) {
value =
LocalizedStringResolver.resolve(
"com.installshield.wizard.i18n.WizardResources",
"WizardBean.valueStr");
}
else {
value = getInstallDestination(pService);
}
option = "-P installLocation=\"" + value + "\"";
String productName = context.resolveString("$P(displayName)");
String title =
LocalizedStringResolver.resolve(
"com.installshield.product.i18n.ProductResources",
"DestinationPanel.ote1Title",
new String[] { productName });
String doc =
LocalizedStringResolver.resolve(
"com.installshield.product.i18n.ProductResources",
"DestinationPanel.ote1Doc");
optionEntries.addElement(
new OptionsTemplateEntry(title, doc, option));
}
catch (ServiceException e) {
context.getServices().logEvent(this, Log.ERROR, e);
}
}[/CODE]
This is from a standard Destination panel:
[CODE] /**
* Called when panel is displayed in console mode when "options-record" or
* "options-template" command line option is used.
*/
public void generateOptionsEntriesDestination(ISOptionsContext context) {
String value = null;
String option = null;
String panelId = context.getPanel().getName();
Vector optionEntries = context.getOptionEntries();
try {
ProductService pService =
(ProductService)context.getService(ProductService.NAME);
if (context.getValueType() == WizardBean.TEMPLATE_VALUE) {
value =
LocalizedStringResolver.resolve(
"com.installshield.wizard.i18n.WizardResources",
"WizardBean.valueStr");
}
else {
value = getInstallDestination(pService);
}
option = "-P installLocation=\"" + value + "\"";
String productName = context.resolveString("$P(displayName)");
String title =
LocalizedStringResolver.resolve(
"com.installshield.product.i18n.ProductResources",
"DestinationPanel.ote1Title",
new String[] { productName });
String doc =
LocalizedStringResolver.resolve(
"com.installshield.product.i18n.ProductResources",
"DestinationPanel.ote1Doc");
optionEntries.addElement(
new OptionsTemplateEntry(title, doc, option));
}
catch (ServiceException e) {
context.getServices().logEvent(this, Log.ERROR, e);
}
}[/CODE]