Package org.apache.tapestry5.urlrewriter

Examples of org.apache.tapestry5.urlrewriter.SimpleRequestWrapper


    @SuppressWarnings("unchecked")
    @Test
    public void component_messages_overrides_validator_messages() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
View Full Code Here


    }

    @Test
    public void component_messages_overrides_validator_messages_per_form() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void constraint_value_from_message_catalog_per() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void constraint_value_from_message_catalog_per_form() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void missing_field_validator_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void single_validator_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void multiple_validators_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator required = mockValidator();
        Validator minLength = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void validator_with_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

            public Request process(Request request)
            {
                final String path = request.getPath();
                if (path.equals("/struts"))
                {
                    request = new SimpleRequestWrapper(request, "/jsf");
                }
                return request;
               
            }
           
        };
       
        URLRewriterRule rule2 = new URLRewriterRule() {

            public Request process(Request request)
            {
                final String path = request.getPath();
                if (path.equals("/jsf"))
                {
                    request = new SimpleRequestWrapper(request, "/tapestry");
                }
                return request;
               
            }
           
        };
       
        URLRewriterRule rule3 = new URLRewriterRule() {

            public Request process(Request request)
            {
                String path = request.getPath();
                if (path.equals("/tapestry"))
                {
                    path = "/" + URLRewriteSuccess.class.getSimpleName();
                    request = new SimpleRequestWrapper(request, path);
                }
                return request;
               
            }
           
View Full Code Here

        {
            public Request process(Request request)
            {
                final String serverName = request.getServerName().toUpperCase();
                final String path = request.getPath().toUpperCase();
                return new SimpleRequestWrapper(request, serverName, path);
            }
        };

        InternalURLRewriterRule rule2 = new InternalURLRewriterRule();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.urlrewriter.SimpleRequestWrapper

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.