Package org.apache.tapestry5

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


        EasyMock.expect(resources.triggerEvent(EasyMock.eq(EventConstants.TO_CLIENT),
                                               EasyMock.aryEq(new Object[] {value}),
                                               EasyMock.isA(ComponentEventCallback.class))).andReturn(false);

        expect(translator.toClient(value)).andReturn(clientValue);

        replay();

        FieldValidationSupport support = new FieldValidationSupportImpl(typeCoercer);
View Full Code Here


        replay();

        FieldValidationSupport support = new FieldValidationSupportImpl(typeCoercer);

        String actual = support.toClient(value, resources, translator, nullFieldStrategy);

        assertEquals(actual, clientValue);

        verify();
    }
View Full Code Here

        replay();

        FieldValidationSupport support = new FieldValidationSupportImpl(null);

        String actual = support.toClient(value, resources, translator, nullFieldStrategy);

        assertEquals(actual, clientValue);

        verify();
    }
View Full Code Here

        FieldValidationSupport support = new FieldValidationSupportImpl(null);

        try
        {

            support.toClient(value, resources, translator, null);

            unreachable();
        }
        catch (RuntimeException ex)
        {
View Full Code Here

    @Test(dataProvider = "to_client_data")
    public void to_client(Class type, Object value, String expected)
    {
        Translator t = source.getByType(type);

        String actual = t.toClient(value);

        assertEquals(actual, expected);
    }

    @DataProvider
View Full Code Here

    @Test(dataProvider = "to_client_data")
    public void to_client(Class type, Object value, String expected)
    {
        Translator t = source.getByType(type);

        String actual = t.toClient(value);

        assertEquals(actual, expected);
    }

    @DataProvider
View Full Code Here

    @Test(dataProvider = "to_client_data")
    public void to_client(Class type, Object value, String expected)
    {
        Translator t = source.getByType(type);

        String actual = t.toClient(value);

        assertEquals(actual, expected);
    }

    @DataProvider
View Full Code Here

    @Test(dataProvider = "to_client_data")
    public void to_client(Class type, Object value, String expected)
    {
        Translator t = source.getByType(type);

        String actual = t.toClient(value);

        assertEquals(actual, expected);
    }

    @DataProvider(name = "parse_client_success_data")
View Full Code Here

    @Test(dataProvider = "to_client_data")
    public void to_client(Class type, Object value, String expected)
    {
        Translator t = source.getByType(type);

        String actual = t.toClient(value);

        assertEquals(actual, expected);
    }

    @DataProvider(name = "parse_client_success_data")
View Full Code Here

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

            final Object label = propertyAdapter.get(object);

            options.add(new OptionModelImpl(encoder.toClient(label), object));

        }

        return new SelectModelImpl(null, options);
    }
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.