Package org.apache.tapestry5.integration.app1.data

Examples of org.apache.tapestry5.integration.app1.data.Track


        return items;
    }

    Object onAddRow()
    {
        DoubleItem item = new DoubleItem();
        item.setId(ID_ALLOCATOR.incrementAndGet());

        DB.put(item.getId(), item);

        return item;
    }
View Full Code Here


    Object onAddRow(long context)
    {
        Assert.assertEquals(context, DEMO_CONTEXT_VALUE,
                            "Context value provided to AjaxFormLoop must be provided to the event handler method.");

        DoubleItem item = new DoubleItem();
        item.setId(ID_ALLOCATOR.incrementAndGet());

        DB.put(item.getId(), item);

        return item;
    }
View Full Code Here

                return value.getId();
            }

            public Entity toValue(String clientValue)
            {
                Entity entity = new Entity();
                entity.setId(clientValue);
                entity.setLabel("label" + clientValue);
                return entity;
            }
        };

        ValueEncoderFactory<Entity> valueEncoderFactory = new ValueEncoderFactory<Entity>()
View Full Code Here

    void onPrepare()
    {
        if (entity == null)
        {
            entity = new Entity();
            entity.setId("1");
            entity.setLabel("label1");
        }
    }
View Full Code Here

            public String toClient(Entity value) {
                return value.getId();
            }

            public Entity toValue(String clientValue) {
                Entity entity = new Entity();
                entity.setId(clientValue);
                entity.setLabel("label" + clientValue);
                return entity;
            }
        };

        ValueEncoderFactory<Entity> valueEncoderFactory = new ValueEncoderFactory<Entity>() {
View Full Code Here

    }

    void onPrepare()
    {
        if (incident == null)
            incident = new IncidentData();
    }
View Full Code Here

    }

    void onPrepare()
    {
        if (incident == null)
            incident = new IncidentData();
    }
View Full Code Here

    @Test
    public void range_variable_to()
    {
        PropertyConduit pc = source.create(IntegerHolder.class, "10..value");
        IntegerHolder h = new IntegerHolder();

        h.setValue(5);

        IntegerRange ir = (IntegerRange) pc.get(h);

        assertEquals(ir, new IntegerRange(10, 5));
    }
View Full Code Here

    @Test
    public void range_variable_from()
    {
        PropertyConduit pc = source.create(IntegerHolder.class, "value..99");
        IntegerHolder h = new IntegerHolder();

        h.setValue(72);

        IntegerRange ir = (IntegerRange) pc.get(h);

        assertEquals(ir, new IntegerRange(72, 99));
    }
View Full Code Here

    @Test
    public void not_operator()
    {
        PropertyConduit conduit = source.create(IntegerHolder.class, "! value");
        IntegerHolder holder = new IntegerHolder();

        assertEquals(conduit.get(holder), Boolean.TRUE);

        holder.setValue(99);

        assertEquals(conduit.get(holder), Boolean.FALSE);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.integration.app1.data.Track

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.