Package com.vaadin.data.util.converter

Examples of com.vaadin.data.util.converter.ReverseConverter


    }

    @Test
    public void stringToEnumWithField() {
        TextField tf = new TextField();
        tf.setConverter(new ReverseConverter(converter));
        tf.setPropertyDataSource(new ObjectProperty(AnotherTestEnum.TWO));
        Assert.assertEquals(AnotherTestEnum.TWO.toString(), tf.getValue());
        tf.setValue(AnotherTestEnum.ONE.toString());
        Assert.assertEquals(AnotherTestEnum.ONE.toString(), tf.getValue());
        Assert.assertEquals(AnotherTestEnum.ONE, tf.getConvertedValue());
View Full Code Here


    }

    @Test
    public void stringToEnumWithField() {
        TextField tf = new TextField();
        tf.setConverter(new ReverseConverter(anotherTestEnumConverter));
        tf.setPropertyDataSource(new ObjectProperty(AnotherTestEnum.TWO));
        Assert.assertEquals(AnotherTestEnum.TWO.toString(), tf.getValue());
        tf.setValue(AnotherTestEnum.ONE.toString());
        Assert.assertEquals(AnotherTestEnum.ONE.toString(), tf.getValue());
        Assert.assertEquals(AnotherTestEnum.ONE, tf.getConvertedValue());
View Full Code Here

TOP

Related Classes of com.vaadin.data.util.converter.ReverseConverter

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.