cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pjbeatty
Level 3

Uninstall doesn't seem to call generateOptionsEntries

I have a custom dialog (with a generateOptionsEntries event) that I use in uninstall sequence. I generated a response file by using -options-record uninstall.txt, but the only thing written to uninstall.txt were the 2 feature.active entries. The generateOptionsEntries of my custom dialog did not get called. It appears as if generateOptionsEntries events are only called for dialogs that were called during the initial install sequence. How can I get a custom dialog that is only used during uninstall to add it's options to a response file during uninstall?
Labels (1)
0 Kudos

(2) Replies
danquo
Level 3

pjbeatty wrote:
I have a custom dialog (with a generateOptionsEntries event) that I use in uninstall sequence. I generated a response file by using -options-record uninstall.txt, but the only thing written to uninstall.txt were the 2 feature.active entries. The generateOptionsEntries of my custom dialog did not get called. It appears as if generateOptionsEntries events are only called for dialogs that were called during the initial install sequence. How can I get a custom dialog that is only used during uninstall to add it's options to a response file during uninstall?


I have gotten this to work before. The generateOptionsEntries method should be called for each panel that's utilized during the uninstall. What does your generateOptionsEntries method look like?

Should have an if/else clause that should check to see if
context.getValueType() == WizardBean.TEMPLATE_VALUE 
or not (the *not* part is the part you are concerned with, i.e. the part that would be setting the value when running with -options-record, instead of -options-template). After that, make sure you create title, description, and option strings (option string containing the recorded value) and then call
optionEntries.addElement(new OptionsTemplateEntry(title, description, option);
where optionEntries is a Vector returned from context.getOptionEntries()
0 Kudos
pjbeatty
Level 3

I have this working for install. Like I said generateOptionsEntries does not get called for a dialog that is in the uninstall sequence. I used my Eclipse debugger to check this. I set a breakpoint, but breakpoint was never reached. Breakpoints set in generateOptionsEntries of custom dialogs that run in install sequence are reached.

Since I see that options are created for features, which also initially run during install, I'm thinking that maybe dialogs are only registered to generate options during install sequence. Then if -options-record is given at uninstall, only those dialogs that ran/registered during install and then run in uninstall have their generateOptionsEntries method called.

In other words, if all my custom dialogs run during install, then all would have their generateOptionsEntries method called during uninstall.

This is just my speculation based on what I've observed from the uninstall response file and setting breakpoints in my debugger.
0 Kudos