Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.SelectOption


        final String[] unmatchedValue = new String[] {NON_MATCHING_VALUE};
        List options = doTest(unmatchedValue);

        final int length = options.size();
        for (int i = 0; i < length; i++) {
            final SelectOption option = (SelectOption) options.get(i);
            assertFalse(option.isSelected());
        }
    }
View Full Code Here


     */
    private void handleOptionGroups(DOMOutputBuffer dom, List optionGroup) {
        for (Iterator i = optionGroup.iterator(); i.hasNext(); /* */) {
            Object item = i.next();
            if (item instanceof SelectOption) {
                SelectOption option = (SelectOption)item;
                String aliasValAttribute =
                        getPlainText(option.getCaption());
                addAliasElement(dom, aliasValAttribute, option.getValue());
            } else if (item instanceof SelectOptionGroup) {
                handleOptionGroups(
                        dom,
                        ((SelectOptionGroup)item).getSelectOptionList());
            }
View Full Code Here

        List options = attributes.getOptions();
        Iterator i = options.iterator();
        boolean finished = false;

        while ((i.hasNext()) && (!finished)) {
            SelectOption option = (SelectOption)i.next();
            String value = option.getValue();
            if (value != null && value.equals(init)) {
                initialString = getPlainText(option.getCaption());
                finished = true;
            }
        }
        if (!finished) {
            initialString =
View Full Code Here

        Iterator i = optionGroup.iterator();
        boolean finished = false;
        while ((i.hasNext()) && (!finished)) {
            Object item = i.next();
            if (item instanceof SelectOption) {
                SelectOption option = (SelectOption)item;
                String value = option.getValue();
                if (value != null && value.equals(init)) {
                    initialString = getPlainText(option.getCaption());
                    finished = true;
                }
            } else if (item instanceof SelectOptionGroup) {
                findInitialValueinGroups(
                        ((SelectOptionGroup)item).getSelectOptionList(),
View Full Code Here

            String fieldName) {

        for (Iterator i = options.iterator(); i.hasNext();) {
            Object unknown = i.next();
            if (unknown instanceof SelectOption) {
                SelectOption option = (SelectOption) unknown;

                outStr.append(" (").append(getCaption(option))
                        .append(") {<").append(fieldName)
                        .append(" \"").append(option.getValue()).append("\">}");
            } else {
                addSingleOptions(((SelectOptionGroup) unknown).getSelectOptionList(),
                                 outStr, fieldName);
            }
        }
View Full Code Here

            int count) {

        for (Iterator i = options.iterator(); i.hasNext(); count += 1) {
            Object unknown = i.next();
            if (unknown instanceof SelectOption) {
                SelectOption option = (SelectOption) unknown;

                outStr.append(" (").append(getCaption(option))
                        .append(") {<option").append(count)
                        .append(" true>}");
            } else {
View Full Code Here

    private void handleOptionFields(Collection options, DOMOutputBuffer dom,
                                      int count) {
        for (Iterator i = options.iterator(); i.hasNext(); count += 1) {
            Object unknown = i.next();
            if (unknown instanceof SelectOption) {
                SelectOption option = (SelectOption) unknown;
                Element element = dom.addStyledElement("field", option);
                // @todo better (BW) - why is the option variable not used?
                element.setAttribute("name", "option" + count);
                element.setAttribute("type", "boolean");
            } else {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.SelectOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.