Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.BindingFactory.newBinding()


        String defaultPrefix = "def";
        String description = "descrip";
        String expression = "full expression";

        factory.newBinding(description, container, component, expression, l);
        setThrowable(t);

        replay();

        Map<String, BindingFactory> map = newMap();
View Full Code Here


        // And if that's null, what then? We assume that the default prefix is a valid prefix,
        // or we'll get an NPE below and report it like any other error.

        try
        {
            return factory.newBinding(interner.intern(description), container, component, subexpression, location);
        } catch (Exception ex)
        {
            throw new TapestryException(String.format("Could not convert '%s' into a component parameter binding: %s", expression, InternalUtils.toMessage(ex)), location, ex);
        }
    }
View Full Code Here

        // And if that's null, what then? We assume that the default prefix is a valid prefix,
        // or we'll get an NPE below and report it like any other error.

        try
        {
            return factory.newBinding(interner.intern(description), container, component, subexpression, location);
        }
        catch (Exception ex)
        {
            throw new TapestryException(ServicesMessages.bindingSourceFailure(expression, ex), location, ex);
        }
View Full Code Here

        replay();

        BindingFactory factory = new LiteralBindingFactory();

        Binding b = factory.newBinding("test binding", res, null, "Tapestry5", l);

        assertSame(InternalUtils.locationOf(b), l);

        assertEquals(b.get(), "Tapestry5");
        assertTrue(b.isInvariant());
View Full Code Here

        replay();

        BindingFactory factory = new TranslateBindingFactory(source, new StringInternerImpl());

        Binding binding = factory.newBinding(description, resources, resources, expression, l);

        assertSame(binding.get(), translator);

        assertSame(InternalUtils.locationOf(binding), l);
View Full Code Here

        replay();
       
        BindingFactory factory = getService("SymbolBindingFactory", BindingFactory.class);
       
        Binding binding = factory.newBinding("Test binding", res, null, SymbolConstants.START_PAGE_NAME, l);
       
        assertEquals(binding.get(), "start");
       
        verify();
    }
View Full Code Here

        BindingFactory factory = new ValidateBindingFactory(source, interner);

        try
        {
            factory.newBinding("descrip", container, component, "zip,zoom", l);
        }
        catch (TapestryException ex)
        {
            assertEquals(
                    ex.getMessage(),
View Full Code Here

        replay();

        BindingFactory factory = new ValidateBindingFactory(source, interner);

        Binding binding = factory.newBinding("descrip", container, component, expression, l);

        assertSame(binding.get(), validator);

        verify();
    }
View Full Code Here

        replay();

        BindingFactory factory = new LiteralBindingFactory();

        Binding b = factory.newBinding("test binding", res, null, "Tapestry5", l);

        assertSame(InternalUtils.locationOf(b), l);

        assertEquals(b.get(), "Tapestry5");
        assertTrue(b.isInvariant());
View Full Code Here

        replay();

        BindingFactory factory = new TranslateBindingFactory(source, new StringInternerImpl());

        Binding binding = factory.newBinding(description, resources, resources, expression, l);

        assertSame(binding.get(), translator);

        assertSame(InternalUtils.locationOf(binding), l);
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.