Package org.apache.tapestry5

Examples of org.apache.tapestry5.FieldTranslator.toClient()


    {
        assert value != null;

        ValueEncoder encoder = valueEncoderSource.getValueEncoder(value.getClass());

        return encoder.toClient(value);
    }


    public <T> T toValue(Class<T> requiredType, String clientValue)
    {
View Full Code Here


        replay();

        ValueEncoder ve = coercion.coerce(pke);

        assertEquals(ve.toClient(value), "99");
        assertEquals(ve.toValue("99"), value);

        verify();
    }
View Full Code Here

        final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter
                .getType());

        final Object label = propertyAdapter.get(object);

        return encoder.toClient(label);
    }
}
View Full Code Here

    {
        Defense.notNull(value, "value");

        ValueEncoder encoder = valueEncoderSource.getValueEncoder(value.getClass());

        return encoder.toClient(value);
    }


    public <T> T toValue(Class<T> requiredType, String clientValue)
    {
View Full Code Here

        BigDecimal big = new BigDecimal("-123456.797956563434");

        assertEquals(f.parse("*123_456#797956563434"), big);

        assertEquals(f.toClient(big), "*123456#797956563434");
    }

}
View Full Code Here

        BigDecimal big = new BigDecimal("-123456.797956563434");

        assertEquals(f.parse("*123_456#797956563434"), big);

        assertEquals(f.toClient(big), "*123456#797956563434");
    }


}
View Full Code Here

        BigInteger big = new BigInteger("-123456");

        assertEquals(f.parse("*123_456"), big);

        assertEquals(f.toClient(big), "*123456");
    }

    @Test
    public void bigdecimal_with_localized_symbols() throws ParseException
    {
View Full Code Here

        BigInteger big = new BigInteger("-123456");

        assertEquals(f.parse("*123_456"), big);

        assertEquals(f.toClient(big), "*123456");
    }

    @Test
    public void bigdecimal_with_localized_symbols() throws ParseException
    {
View Full Code Here

        replay();

        ContextValueEncoder cve = new ContextValueEncoderImpl(source);

        assertSame(cve.toClient(value), encoded);

        verify();
    }

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.