Examples of InitialValueHandler


Examples of com.volantis.mcs.protocols.wml.InitialValueHandler

        group1.addSelectOption(H);

        // add group1 to the select attributes
        attributes.addOptionGroup(group1);

        InitialValueHandler handler = new InitialValueHandler();
        String initialValues = handler.getInitialValue(attributes);

        //System.out.println("initial values are " + initialValues);
        assertEquals("initial value should be 4;5;8",
                     "4;5;8", initialValues);

        // test single select
        attributes.setMultiple(false);
        attributes.setInitial("D");
        initialValues = handler.getInitialValue(attributes);

        //System.out.println("initial values are " + initialValues);
        assertEquals("initial value should be 4",
                     "4", initialValues);
       
        // test that null is returned when no options are selected
        initialValues = handler.getInitialValue(new XFSelectAttributes());
        assertNull("Initial Value should be null", initialValues);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.