Choice

Technology area
Installer

Overview

A Choice object represents a single installation choice. Choice objects are properties of the choices global variable and represent the installation choices defined in a distribution package.

The name of each property of the choices array corresponds to the choice-id attribute of each of the distribution’s installation choices (see Distribution Definition XML Schema Reference for more information). Therefore, a specific choice is accessed this way:

choices.<choice-id>

<choice-id> represents the identifier of the desired choice in the installation definition. For example, to access the selected property of a choice with 'choice_a' as its identifier, you would use the following expression:

choices.['choice_a'].selected

Tasks

Properties

Properties

description

String with the description of the distribution.

enabled

true when the choice is enabled, false otherwise.

packages

Discussion

Array identifying each package attached to the choice. Each item of the array references a pkg-ref element in the installation definition and contains the following two properties:

packageUpgradeAction

Discussion

String that specifies the relationship between the choice’s packages (specified by the packages property) and the same packages (based on the package identifier) installed on the host. The possible values are:

For example, if a distribution contains a choice with a required package, you may deselect that choice if the installed package is more recent.

selected

true when the choice is selected, false otherwise.

title

String with the title of the distribution package.

visible

true when the choice is visible, false otherwise.