Can I dynamically select/deselect a component based on another component's selection?

Comments

1 comment

  • Avatar
    wojciechka

    This can be done using actions. The selection will not change instantly as user modifies the selected components, however, it is possible to change the components in <readyToInstallActionList> or after any of the pages after component selection.

    As an alternative, you can hide some of the components and show a <choiceParameter> and/or combined with <booleanParameterGroup> to ask the user about installing specific components. For example:

    <booleanParameterGroup> <name>install_database</name> <description>Install database</description> <explanation></explanation> <value></value> <default>0</default> <parameterList> <choiceParameter> <name>database_type</name> <description>Database type</description> <explanation></explanation> <value></value> <default></default> <allowEmptyValue>1</allowEmptyValue> <displayType>radiobuttons</displayType> <ordering>default</ordering> <width>40</width> <optionList> <option> <description></description> <image></image> <text>SQLite</text> <value>sqlite</value> </option> <option> <description></description> <image></image> <text>MySQL</text> <value>mysql</value> </option> <option> <description></description> <image></image> <text>PostgreSQL</text> <value>postgresql</value> </option> </optionList> </choiceParameter> </parameterList> <postShowPageActionList> <if> <actionList> <componentSelection> <deselect>database_mysql,database_postgresql</deselect> <select>databases,database_sqlite</select> <ruleList> <compareValues> <logic>equals</logic> <value1>${database_type}</value1> <value2>sqlite</value2> </compareValues> </ruleList> </componentSelection> <componentSelection> <deselect>database_sqlite,database_postgresql</deselect> <select>databases,database_mysql</select> <ruleList> <compareValues> <logic>equals</logic> <value1>${database_type}</value1> <value2>mysql</value2> </compareValues> </ruleList> </componentSelection> <componentSelection> <deselect>database_sqlite,database_mysql</deselect> <select>databases,database_postgresql</select> <ruleList> <compareValues> <logic>equals</logic> <value1>${database_type}</value1> <value2>postgresql</value2> </compareValues> </ruleList> </componentSelection> </actionList> <conditionRuleList> <isTrue> <value>${install_database}</value> </isTrue> </conditionRuleList> <elseActionList> <componentSelection> <deselect>databases</deselect> <select></select> </componentSelection> </elseActionList> </if> </postShowPageActionList> </booleanParameterGroup>

    The above shows a boolean choice whether database should be installed, followed by radiobutton for selecting database type.

    Also, I apologize for the late response. Due to an issue with notification system, we have missed this question.

Please sign in to leave a comment.