Hi,

I don't want to prompt users for a set of components to install, but rather present parameters that they chose/enter, and based on their input, install a component.

Can I add a rule for a component to be installed based on a parameter? How?

asked 05 Mar '12, 19:11

bstoke's gravatar image

bstoke
16222224
accept rate: 0%


You can enable/disable components on the fly based on any condition using the <componentSelection> action. For example, if you give your user the choice of enabling the extended functionality through a <booleanParameter> you could use its <postShowPageActionList> to configure the component:

<booleanParameter>
    <name>installAdvance</name>
    ...
    <postShowPageActionList>
        <componentSelection>
            <select>advancedComponent</select>
            <ruleList>
                <isTrue>
                    <value>${installAdvance}</value>
                </isTrue>
            </ruleList>
        </componentSelection>
        <componentSelection>
            <deselect>advancedComponent</deselect>
            <ruleList>
                <isFalse>
                    <value>${installAdvance}</value>
                </isFalse>
            </ruleList>
        </componentSelection>
    </postShowPageActionList>
</booleanParameter>

If you also plan to to support unattended installation you will also need to place the code in the <readyToInstallActionList>, as the pages won't be displayed:

 <readyToInstallActionList>
    <componentSelection>
        <select>advancedComponent</select>
        <ruleList>
            <isTrue>
                <value>${installAdvance}</value>
            </isTrue>
        </ruleList>
    </componentSelection>
    <componentSelection>
        <deselect>advancedComponent</deselect>
        <ruleList>
            <isFalse>
                <value>${installAdvance}</value>
            </isFalse>
        </ruleList>
    </componentSelection>
 </readyToInstallActionList>
link

answered 06 Mar '12, 03:00

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

ok - thanks. Why would it need to be in both places? Wouldn't the gui install use the <readytoinstallactionlist> too?

(06 Mar '12, 10:18) bstoke

Yes, I suggested placing it in the postShowPage in case the new enabled component must display pages. In the case of the unattended mode that is not important as the pages won't be displayed in any case.

If you do not need the dynamically selected components to show any pages, the best option would be to place the code in the readyToInstall

(06 Mar '12, 10:31) juanjo ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×49

Asked: 05 Mar '12, 19:11

Seen: 1,960 times

Last updated: 06 Mar '12, 10:31