Package org.apache.tapestry5

Examples of org.apache.tapestry5.NullFieldStrategy


                boolean handled = requestHandler.service(request, response);

                if (!handled) { throw new RuntimeException(String.format(
                        "Request was not handled: '%s' may not be a valid page name.", pageName)); }

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here


                if (!handled)
                    throw new RuntimeException(String.format("Request for path '%s' was not handled by Tapestry.",
                            request.getPath()));

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here

    @Test
    public void parse_client_via_event() throws ValidationException
    {
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        String clientValue = "abracadabra";

        IAnswer answer = new IAnswer()
        {
View Full Code Here

    @Test
    public void parse_client_for_null_value_returns_null_and_bypasses_events_and_translator() throws Exception
    {
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        String clientValue = "";

        train_replaceFromClient(nullFieldStrategy, "");
View Full Code Here

    public void parse_client_event_handler_throws_validation_exception() throws Exception
    {
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        ValidationException ve = new ValidationException("Just didn't feel right.");
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        String clientValue = "abracadabra";

        EasyMock.expect(resources.triggerEvent(EasyMock.eq(EventConstants.PARSE_CLIENT),
                                               EasyMock.isA(Object[].class),
View Full Code Here

    public void parse_client_event_handler_fails_with_other_exception() throws Exception
    {
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        RuntimeException re = new RuntimeException("Just didn't feel right.");
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        String clientValue = "abracadabra";


        EasyMock.expect(resources.triggerEvent(EasyMock.eq(EventConstants.PARSE_CLIENT),
View Full Code Here

    @Test
    public void parse_client_via_translator() throws ValidationException
    {
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        String clientValue = "abracadabra";

        ignoreEvent(resources, EventConstants.PARSE_CLIENT, clientValue);
View Full Code Here

    public void to_client_via_translator()
    {
        Object value = new Integer(99);
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        expect(translator.getType()).andReturn(Integer.class);

        String clientValue = "abracadabra";
View Full Code Here

    public void to_client_via_event_handler() throws Exception
    {
        Object value = new Object();
        ComponentResources resources = mockComponentResources();
        FieldTranslator translator = mockFieldTranslator();
        NullFieldStrategy nullFieldStrategy = mockNullFieldStrategy();

        final String clientValue = "abracadabra";

        IAnswer answer = new IAnswer()
        {
View Full Code Here

        this.configuration = configuration;
    }

    public NullFieldStrategy get(String name)
    {
        NullFieldStrategy result = configuration.get(name);

        if (result != null) return result;
       
        throw new UnknownValueException(String.format("Unrecognized name '%s' locating a null field strategy.", name),
                new AvailableValues("Configured null field strategies", configuration));
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.NullFieldStrategy

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.