cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
trackercanada
Level 2

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.
Labels (1)
0 Kudos
(1) Reply
ElihuRozen
Level 3

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]
0 Kudos