public static List<String> getSelectOptionValues(CmsObject cms, String rootPath, boolean allRemoved) {

        try {
            cms = OpenCms.initCmsObject(cms);
            cms.getRequestContext().setSiteRoot("");
            CmsADEConfigData adeConfig = OpenCms.getADEManager().lookupConfiguration(cms, rootPath);
            if (adeConfig.parent() != null) {
                adeConfig = adeConfig.parent();
            }

            List<CmsSelectWidgetOption> options = getFormatterOptionsStatic(cms, adeConfig, rootPath, allRemoved);
            List<CmsSelectWidgetOption> typeOptions = getTypeOptionsStatic(cms, adeConfig, allRemoved);
            options.addAll(typeOptions);
            List<String> result = new ArrayList<String>(options.size());
            for (CmsSelectWidgetOption o : options) {
                result.add(o.getValue());
            }
            return result;
        } catch (CmsException e) {
            // should never happen
            LOG.error(e.getLocalizedMessage(), e);
            return null;
        }

    }
public static List < String > getSelectOptionValues ( CmsObject cms , String rootPath , boolean allRemoved ) { try { cms = OpenCms . initCmsObject ( cms ) ; cms . getRequestContext ( ) . setSiteRoot ( "" ) ; CmsADEConfigData adeConfig = OpenCms . getADEManager ( ) . lookupConfiguration ( cms , rootPath ) ; if ( adeConfig . parent ( ) != null ) { adeConfig = adeConfig . parent ( ) ; } List < CmsSelectWidgetOption > options = getFormatterOptionsStatic ( cms , adeConfig , rootPath , allRemoved ) ; List < CmsSelectWidgetOption > typeOptions = getTypeOptionsStatic ( cms , adeConfig , allRemoved ) ; options . addAll ( typeOptions ) ; List < String > result = new ArrayList < String > ( options . size ( ) ) ; for ( CmsSelectWidgetOption o : options ) { result . add ( o . getValue ( ) ) ; } return result ; } catch ( CmsException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; return null ; } }
Returns all values that can be selected in the widget.
@param cms the current CMS object
@param rootPath the root path to the currently edited xml file (sitemap config)
@param allRemoved flag, indicating if all inheritedly available formatters should be disabled
@return all values that can be selected in the widget.