private void parseConfiguration() {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_configuration)) {
            //split the configuration in single strings to handle every string single.
            String[] selectOptions = splitOptions(m_configuration);

            for (int i = 0; i < selectOptions.length; i++) {
                try {
                    String value;
                    String label = "";
                    boolean isDefault = false;
                    String help = "";
                    String option = selectOptions[i];
                    option = option.replace("\\|", "|");

                    int valuePos = option.indexOf(KEY_VALUE);
                    int defaultPos = option.indexOf(KEY_DEFAULT);
                    int optionPos = option.indexOf(KEY_OPTION);
                    int helpPos = option.indexOf(KEY_HELP);
                    if (valuePos != 0) {
                        throw new Exception("Invalid select widget configuration \"" + option + "\" is ignored.");
                    }
                    int end = defaultPos >= 0
                    ? defaultPos
                    : optionPos >= 0 ? optionPos : helpPos >= 0 ? helpPos : option.length();
                    value = option.substring((valuePos + KEY_VALUE.length()) - 1, end).trim();
                    value = value.substring(1, value.length() - 1);

                    isDefault = (defaultPos >= 0)
                        && option.substring(defaultPos + KEY_DEFAULT.length()).startsWith("true");

                    if (optionPos >= 0) {
                        end = helpPos >= 0 ? helpPos : option.length();
                        label = option.substring((optionPos + KEY_OPTION.length()) - 1, end).trim();
                        label = label.substring(1, label.length() - 1);
                    } else {
                        label = value;
                    }
                    if (helpPos >= 0) {
                        help = option.substring((helpPos + KEY_HELP.length()) - 1, option.length()).trim();
                        help = help.substring(1, help.length() - 1);
                    }
                    m_options.put(value, label);
                    m_helpTexts.put(value, help);
                    if (isDefault) {
                        m_defaultValues.add(value);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
private void parseConfiguration ( ) { if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( m_configuration ) ) { String [ ] selectOptions = splitOptions ( m_configuration ) ; for ( int i = 0 ; i < selectOptions . length ; i ++ ) { try { String value ; String label = "" ; boolean isDefault = false ; String help = "" ; String option = selectOptions [ i ] ; option = option . replace ( "\\|" , "|" ) ; int valuePos = option . indexOf ( KEY_VALUE ) ; int defaultPos = option . indexOf ( KEY_DEFAULT ) ; int optionPos = option . indexOf ( KEY_OPTION ) ; int helpPos = option . indexOf ( KEY_HELP ) ; if ( valuePos != 0 ) { throw new Exception ( "Invalid select widget configuration \"" + option + "\" is ignored." ) ; } int end = defaultPos >= 0 ? defaultPos : optionPos >= 0 ? optionPos : helpPos >= 0 ? helpPos : option . length ( ) ; value = option . substring ( ( valuePos + KEY_VALUE . length ( ) ) - 1 , end ) . trim ( ) ; value = value . substring ( 1 , value . length ( ) - 1 ) ; isDefault = ( defaultPos >= 0 ) && option . substring ( defaultPos + KEY_DEFAULT . length ( ) ) . startsWith ( "true" ) ; if ( optionPos >= 0 ) { end = helpPos >= 0 ? helpPos : option . length ( ) ; label = option . substring ( ( optionPos + KEY_OPTION . length ( ) ) - 1 , end ) . trim ( ) ; label = label . substring ( 1 , label . length ( ) - 1 ) ; } else { label = value ; } if ( helpPos >= 0 ) { help = option . substring ( ( helpPos + KEY_HELP . length ( ) ) - 1 , option . length ( ) ) . trim ( ) ; help = help . substring ( 1 , help . length ( ) - 1 ) ; } m_options . put ( value , label ) ; m_helpTexts . put ( value , help ) ; if ( isDefault ) { m_defaultValues . add ( value ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } } }
Parses the configuration string if provided in canonical format.<p>

At the client side, the string has always to be in the canonical format "value='...' default='...' option='...' help='...'|..."
where only value is mandatory, the other things are optional.

The format is produced by {@link org.opencms.widgets.CmsSelectWidgetOption#createConfigurationString(List)}.