Package org.apache.myfaces.extensions.cdi.message.impl

Examples of org.apache.myfaces.extensions.cdi.message.impl.ELAwareMessageInterpolator


            }
        };

        assertEquals("brand-value", dynArgument.getKey());

        String messageText = this.messageContext.config().use().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider())).create()
                .message().text("{brand_info}").namedArgument("brand", dynArgument.getKey()).toText();

        assertEquals("value: brand-value", messageText);
    }
View Full Code Here


    public FacesMessageInterpolator(ELProvider elProvider, ArgumentFilter argumentFilter)
    {
        if(elProvider != null)
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
                    new ELAwareMessageInterpolator(elProvider, argumentFilter),
                    new NumberedArgumentAwareMessageInterpolator());
        }
        else
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
View Full Code Here

        fail();
    }

    private ELAwareMessageInterpolator createELAwareInterpolator()
    {
        return new ELAwareMessageInterpolator(new TestELProvider());
    }
View Full Code Here

    FacesMessageInterpolator(ELProvider elProvider, ArgumentFilter argumentFilter)
    {
        if(elProvider != null)
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
                    new ELAwareMessageInterpolator(elProvider, argumentFilter),
                    new NumberedArgumentAwareMessageInterpolator());
        }
        else
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
View Full Code Here

    }

    @Test
    public void createMessageWithLocalizableNamedAttributeTest()
    {
        this.messageContext.config().change().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider())).create();

        String messageText = this.messageContext.message().text("{brand_info}").namedArgument("brand", new TestCar()).toText();

        assertEquals("value: jCar", messageText);
    }
View Full Code Here

    {
        TestArgument dynArgument = new TestArgument("brand_key");

        Assert.assertEquals("{brand_key}", dynArgument.getKey());

        String messageText = this.messageContext.config().use().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider())).create()
                .message().text("{brand_info}").namedArgument("brand", dynArgument.getKey()).toText();

        Assert.assertEquals("jCar", dynArgument.toString(this.messageContext));
        assertEquals("value: jCar", messageText);
    }
View Full Code Here

            }
        };

        Assert.assertEquals("brand-value", dynArgument.getKey());

        String messageText = this.messageContext.config().use().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider())).create()
                .message().text("{brand_info}").namedArgument("brand", dynArgument.getKey()).toText();

        assertEquals("value: brand-value", messageText);
    }
View Full Code Here

    FacesMessageInterpolator(ELProvider elProvider, ArgumentFilter argumentFilter)
    {
        if(elProvider != null)
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
                    new ELAwareMessageInterpolator(elProvider, argumentFilter),
                    new NumberedArgumentAwareMessageInterpolator());
        }
        else
        {
            this.messageInterpolator = new CompositeMessageInterpolator(
View Full Code Here

public class HelperTest extends AbstractMessageContextAwareTest
{
    @Test
    public void namedArgumentBuilderTest()
    {
        this.messageContext.config().change().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider()));

        Number arg1 = new BigDecimal("123.4567");
        Date arg2 = new Date();
        String text = "#1: {arg1} and #2: {arg2}";
        Message message1 = this.messageContext.message().text(text)
View Full Code Here

    }

    @Test
    public void convertNamedArgumentTest()
    {
        this.messageContext.config().change().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider()));

        Number arg1 = new BigDecimal("123.4567");
        Date arg2 = new Date();
        String text = "#1: {arg1} and #2: {arg2}";
        Message message1 = this.messageContext.message().text(text)
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.message.impl.ELAwareMessageInterpolator

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.