Package org.apache.tapestry.binding

Examples of org.apache.tapestry.binding.BindingFactory


    public void testNoPrefixWithDefault()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        factory.createBinding(component, "foo", "an-expression", l);
        getControl(factory).setReturnValue(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.OGNL_PREFIX);
        c.setFactory(factory);
View Full Code Here


    public void testKnownPrefix()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        factory.createBinding(component, "bar", "path part of locator", l);
        getControl(factory).setReturnValue(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix("prefix");
        c.setFactory(factory);
View Full Code Here

    public void testPrefixNoMatch()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        factory.createBinding(component, "zip", "unknown:path part of locator", l);
        getControl(factory).setReturnValue(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.LITERAL_PREFIX);
        c.setFactory(factory);
View Full Code Here

{
    public void testNoPrefix()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.LITERAL_PREFIX);
        c.setFactory(factory);

        // Training

        expect(factory.createBinding(component, "foo", "a literal value without a prefix", l)).andReturn(binding);

        replay();

        BindingSourceImpl bs = new BindingSourceImpl();
        bs.setContributions(Collections.singletonList(c));
View Full Code Here

    public void testNoPrefixWithDefault()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        expect(factory.createBinding(component, "foo", "an-expression", l)).andReturn(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.OGNL_PREFIX);
        c.setFactory(factory);
View Full Code Here

    public void testKnownPrefix()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        expect(factory.createBinding(component, "bar", "path part of locator", l)).andReturn(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix("prefix");
        c.setFactory(factory);
View Full Code Here

    public void testPrefixNoMatch()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        expect(factory.createBinding(component, "zip", "unknown:path part of locator", l)).andReturn(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.LITERAL_PREFIX);
        c.setFactory(factory);
View Full Code Here

{
    public void test_No_Prefix()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.LITERAL_PREFIX);
        c.setFactory(factory);

        // Training

        expect(factory.createBinding(component, "foo", "a literal value without a prefix", l)).andReturn(binding);

        replay();

        BindingSourceImpl bs = new BindingSourceImpl();
        bs.setContributions(Collections.singletonList(c));
View Full Code Here

    public void test_No_Prefix_With_Default()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        // Training

        expect(factory.createBinding(component, "foo", "an-expression", l)).andReturn(binding);

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.OGNL_PREFIX);
        c.setFactory(factory);
View Full Code Here

    public void test_No_Prefix_ClientIdList_Binding()
    {
        IComponent component = newComponent();
        IBinding binding = newBinding();
        BindingFactory factory = newFactory();
        Location l = newLocation();

        BindingPrefixContribution c = new BindingPrefixContribution();
        c.setPrefix(BindingConstants.LITERAL_PREFIX);
        c.setFactory(factory);

        BindingFactory idListFactory = newFactory();
        Map propertyMap = new HashMap();
        propertyMap.put("updateComponents", idListFactory);

        IParameterSpecification ps = newMock(IParameterSpecification.class);

        expect(ps.getParameterName()).andReturn("updateComponents").anyTimes();

        // Training

        expect(idListFactory.createBinding(component, "foo", "a literal value without a prefix", l)).andReturn(binding);

        replay();

        BindingSourceImpl bs = new BindingSourceImpl();
        bs.setContributions(Collections.singletonList(c));
View Full Code Here

TOP

Related Classes of org.apache.tapestry.binding.BindingFactory

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.