View Full Version : Suite Installer access to referenced product bean properties

04-30-2003, 06:24 PM
I am trying to gain access to the "active" property in a ProductBean that is part of a "static product reference" of a Suite installation.

Basically, I need to enable/disable certain "external" product beans from the main suite install.

I have tried ProductService.getProductBeanProperty() but it keeps coming back null (although I do not get a error for a non-existent beanID). I also tried the getProductBeanChildren() method, but I consistently get errors with that one.

This is probably the toughest problem I have come across so far, but figure maybe one of the moderators might have a clue on this one.

05-01-2003, 07:48 AM
For a static (single-installer) suite, the child-products' Bean ID values are decorated with the suite IDs, to avoid name collisions between products; you can view these decorated product bean IDs by right-clicking a static product reference, selecting Display Reference Tree, and then selecting a product bean icon...

05-01-2003, 01:19 PM
Thanks for replying!

I wrote a custom panel that before exiting tries to set the 'Active' and 'Visible' property of several product beans:

WizardServices subServices = getServices().getWizardServices(jarFile);
ProductService service = (ProductService)subServices.getService(ProductService.NAME);
beanID, propName, newValue);

I set both "Active" and "Visible" to false.

I then read the property back and it does show as true, but then when I change the beanID to the 'un-decorated' name it comes back as true too ... so I can't use that to verify that it worked.

What I have been using to verify that it works is the "Install Preview" panel, which should only display visible product beans (right?).

At this point I am not sure how to proceed...I verify that the beanID I set properties on match the decorated beanID in the Reference Tree...

Just to give you a synopsis of what I am attempting: I want to hide and not install productBeans based on some user input (License info) in a Suite Install.

05-01-2003, 01:38 PM
Hmmm... It might be easier to test using the Set Product Bean Property action, and you'll want to make sure you're using the internal, lowercase property names ("active", "visible" etc.)...

05-01-2003, 02:21 PM
I tried it using lower case (in the code) and that did not work. If I set the Active property in the GUI before I build that works fine (obviously).

The problem with using actions is that there is no place to put them in the Suite Install project.

This is where we would like all of this to happen because we want the pre-install panel to correctly display the products/components that are available to the user (and the panel is in the Installer tab of the Suite)

Also, I cannot guarantee that any one of the referenced projects will be run (and therefore calling the one place where the action was placed).

Of course, I could put the action is every single referenced project, but then I am right back to where I was (putting condition checks in the projects)....

I have to tell you that I do not know if we have set up our install project(s) "properly", so if there is a better way to do this and still allow installation flexibility feel free to enlighten me ;)


05-01-2003, 02:24 PM
You can add wizard actions to the suite project; that's where I thought you might use the Set Product Bean Property actions...

05-01-2003, 03:11 PM
Um, maybe I am using the wrong jargon here.

When I am talking about my "Suite Install" I have IS open and I have the following tabs: Suite, Installer, Uninstaller, Build.

The Suite tab shows a product tree properties, below is a Single-installer suite to which I can only "Insert Static Product Reference". These Static Product References do not allow me to add anything (other than another static reference).

Obviously, the Installer tab will not allow me to add Actions, just more WizardBeans. I think we are talking about two different things which leads me to believe that you have a better way to do this ;)

05-01-2003, 03:19 PM
I think we're talking about the same thing: the Installer and Uninstaller views (the "wizard trees") can contain "actions", not just panels, where the wizard actions can interact with the product/suite tree...

05-01-2003, 03:26 PM
In the Installer tab it lists Setup Properties, then Wizard Root and then all the Wizard Panels ... but I cannot add Actions there, just more Panels.

The only place I have been able to add actions is in the Product tab for a Product Component.

05-01-2003, 03:38 PM
Hmm, that shouldn't be the case: in the Installer tab of a single-suite project, I can right-click (say) the Destination bean, select Insert Wizard Bean, select (say) the Set Product Bean Property action, and click OK...

05-01-2003, 05:21 PM
I just believed the menu that popped up, it just mentions Wizard Beans. I was able to add an action there....

Now, that did not have the desired affect either...

When I set the beans "Visible" property to "false" it should not show up in the "Install Preview" panel, is this correct?

This is displayed in Custom install mode...when I edit the Setup Type for custom, at the very bottom I get a check box for "VistaCoreInstallerBean_VistaFeatureBean: <-deleted/renamed->" ... but the VistaFeatureBean part does not match the beanID I entered in the action...

This is getting rather confusing...

05-01-2003, 05:31 PM
I ran the install with the BeanProperty action and it does not hide the specified bean in the Install Preview after I set its "Visible" property to false...