Returns the available sub choices for a nested choice element.<p>

@return the available sub choices for a nested choice element as JSON array string
17507
public String buildSubChoices() {

        String elementPath = getParamElementName();

        // we have to add a choice element, first check if the element to add itself is part of a choice or not
        boolean choiceType = Boolean.valueOf(getParamChoiceType()).booleanValue();
        I_CmsXmlSchemaType elemType = m_content.getContentDefinition().getSchemaType(elementPath);
        if (!choiceType || (elemType.isChoiceOption() && elemType.isChoiceType())) {
            // this is a choice option or a nested choice type to add, remove last element name from xpath
            elementPath = CmsXmlUtils.removeLastXpathElement(elementPath);
        }
        elementPath = CmsXmlUtils.concatXpath(elementPath, getParamChoiceElement());
        return buildElementChoices(elementPath, choiceType, false).toString();
    }
210218
private function getSortOrderChoices()
    {
        $choices = [];
        foreach ($this->getSortOrder() as $label => $value) {
            $choices[$label] = $value;
        }

        return $choices;
    }
363521
@JavaScriptMethod
    public JSONArray getScenarioList() {
        JSONArray scenarioList = new JSONArray();
        for (String scenarioName : _projectResult.getScenarioResults().keySet()) {
            JSONObject scenario = new JSONObject();
            scenario.put("ScenarioName", scenarioName);
            scenarioList.add(scenario);
        }
        return scenarioList;
    }
1237264
function() {
    var allOptions = this.dropdown.options;
    
    // Look for multiple selections
    if(this.multiple) {
        var values = [],
            i=0, j=allOptions.length;
        for(; i<j; i++) {
            if(allOptions[i].selected) {
                values.push(allOptions[i].value);
            }
        }
        return values;
    }
    // Only need to look for single selection
    else {
        return allOptions[allOptions.selectedIndex].value;
    }
}
582628
private static Collection<String> getNames(final OptionElement subroot,
                                             final String[] pathElements, int pos) {
    if (pos >= 0) {
      // Not at root.
      if (!pathElements[pos].equals(subroot.name)) {
        return null;
      }
    }

    if (subroot.isValue) {
      return null;
    }

    pos++;
    ArrayList<String> res = new ArrayList<String>();

    if (pos == pathElements.length) {
      /* return names children of this level */

      for (OptionElement optel: subroot.getChildren()) {
        if (optel.isValue) {
          res.add(optel.name);
        }
      }

      return res;
    }

    for (OptionElement optel: subroot.getChildren()) {
      Collection<String> subres = getNames(optel, pathElements, pos);
      if (subres != null) {
        res.addAll(subres);
      }
    }

    return res;
  }
406211
public List<ChoiceBase> getChoiceList()
    {
        if (hasExcludes())
        {
            if (m_cachedList != null)
            {
                return m_cachedList;
            }
            final List<ChoiceBase> retList = new ArrayList<ChoiceBase>();
            for (ChoiceBase choiceBase:m_propertyMetadata.getChoiceList())
            {
                final String key = choiceBase.getKey().toString();
                if (!m_excludes.contains(key))
                {
                    retList.add(choiceBase);
                }
            }
            m_cachedList = retList;
            return retList;
        }
        return m_propertyMetadata.getChoiceList();
    }
160095
public int[] getSelectedComponents ()
    {
        int[] values = new int[_selected.size()];
        Iterator<Integer> iter = _selected.values().iterator();
        for (int ii = 0; iter.hasNext(); ii++) {
            values[ii] = iter.next().intValue();
        }
        return values;
    }
739765
public List<I_CmsDataViewItem> getSelection() {

        List<I_CmsDataViewItem> result = Lists.newArrayList();
        Object val = m_table.get().getValue();
        if (val == null) {
            return result;
        }
        if (val instanceof Collection) {
            Collection<?> results = (Collection<?>)val;
            for (Object obj : results) {
                result.add(m_dataView.getItemById((String)obj));
            }
        } else {
            result.add(m_dataView.getItemById((String)val));
        }
        return result;

    }
844931
public function getFormattedChoices()
    {
        $ret    = [];
        $loaded = [];

        // Populate the raw formatted array with just values as values
        foreach (array_keys($this->choices) as $value) {
            $ret[$value] = $value;
        }

        // First start with arbitrarily set choices map
        if ($this->choicesMap) {
            $loaded = array_intersect_key($this->choicesMap, $ret);
        }

        // Execute the user given callback
        if ($this->choicesCallback) {

              $callbackLoaded = call_user_func(
                  $this->choicesCallback,
                  // Exclude already loaded items to leave the choices map
                  // having precedence over the callback
                  array_diff_key($ret, $loaded)
              );

              // We are forced to proceed to a two step merge (using foreach)
              // else array_merge() as well as the + operator would terribly
              // fail merging integer keys
              if ($callbackLoaded) {
                  foreach ($callbackLoaded as $value => $title) {
                      $loaded[$value] = $title;
                  }
              }
        }

        // Append the count for each value
        foreach ($this->choices as $value => $count) {
            $append = ' <span class="badge">' . $count . '</span>';
            if (isset($loaded[$value])) {
                $ret[$value] = $loaded[$value] . $append;
            } elseif(!$this->exclusiveMode) {
                $ret[$value] .= $append;
            }
            else {
                unset($ret[$value]);
            }
        }

        return $ret;
    }
1110708
function getChoices() {
    return {
      roleIdentifiers: () => {
        return plugin.loadRoles()
        .then(roles => {
          // Build the list of available roles for input verification and interactive selection
          return _.map(roles, role => {
            return {
              value: role.name,
              name: role.name + (role.description ? ' - ' + role.description : '')
            };
          });
        });
      }
    };
  }
892689
public CmsPublishOptions getResourceOptions() throws CmsRpcException {

        CmsPublishOptions result = null;
        try {
            result = getCachedOptions();
        } catch (Throwable e) {
            error(e);
        }
        return result;
    }
1256942
public function getChoices()
    {
        $choices = $this->getOrderedRoles();

        if (isset($choices['ROLE_SUPER_ADMIN'])) {
            unset($choices['ROLE_SUPER_ADMIN']);
        }

        if (isset($choices['ROLE_ADMIN']) && !$this->isCurrentUserSuperAdmin()) {
            unset($choices['ROLE_ADMIN']);
        }

        return $choices;
    }
67614
public String[] getItemsSelected() {
        List<String> selected = new LinkedList<>();
        for (int i = getIndexOffset(); i < listBox.getItemCount(); i++) {
            if (listBox.isItemSelected(i)) {
                selected.add(listBox.getValue(i));
            }
        }
        return selected.toArray(new String[selected.size()]);
    }
968739
@Override
    public String[] getValues() {
        if (this.nullValues || this.values == null) {
            return null;
        }

        if (this.valuesArray != null) {
            return this.valuesArray.clone();
        }

        final String[] valuesArray = new String[this.values.size()];
        int index = 0;
        for (final String value : this.values) {
            if (NULL_MARKER.equals(value)) {
                valuesArray[index++] = null;
            } else {
                valuesArray[index++] = value.substring(1);
            }
        }
        this.valuesArray = valuesArray.clone();
        return valuesArray;
    }
512957
@Override
    public String getSelectedOption() throws WidgetException {
        Object value = getValue();
        if (value != null) {
            if (value instanceof String) {
                return (String) value;
            } else {
                throw new WidgetException("More than one option selected", getByLocator());
            }
        } else {
            return null;
        }
    }
382634
protected Set<String> getElementIds() {

        Set<String> subItems = new HashSet<String>();
        Iterator<Widget> it = m_groupContainer.iterator();
        while (it.hasNext()) {
            Widget w = it.next();
            if (w instanceof CmsContainerPageElementPanel) {
                subItems.add(((CmsContainerPageElementPanel)w).getId());
            }
        }
        subItems.add(m_groupContainer.getId());
        return subItems;
    }
627876
public static function getChoices() {
        return [
            self::MARITAL_STATUS_EMPTY    => "choices.marital-status.empty",
            self::MARITAL_STATUS_SINGLE   => "choices.marital-status.single",
            self::MARITAL_STATUS_PACS     => "choices.marital-status.pacs",
            self::MARITAL_STATUS_MARRIED  => "choices.marital-status.married",
            self::MARITAL_STATUS_WIDOWER  => "choices.marital-status.widower",
            self::MARITAL_STATUS_DIVORCED => "choices.marital-status.divorced",
        ];
    }