Examples of IBeanSpecification


Examples of org.apache.tapestry.spec.IBeanSpecification

        if (first.equals("beans"))
        {
            String name = split[start + 1];

            IBeanSpecification bs = _root.getSpecification().getBeanSpecification(name);

            if (bs == null || bs.getLifecycle() != BeanLifecycle.PAGE)
                return;

            // Again, could cast to AbstractComponent, but this
            // is easier.
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    public void testMessageBeanInitializer() throws Exception
    {
        IComponentSpecification spec = parsePage("MessageBeanInitializer.page");

        IBeanSpecification bs = spec.getBeanSpecification("fred");
        checkLine(bs, 24);
        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("barney", i.getPropertyName());
        assertEquals("message:rubble", i.getBindingReference());
        checkLine(i, 25);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    public void testExpressionBeanInitializer() throws Exception
    {
        IComponentSpecification spec = parsePage("ExpressionBeanInitializer_3_0.page");

        IBeanSpecification bs = spec.getBeanSpecification("zebean");

        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("barney", i.getPropertyName());
        assertEquals("ognl:rubble", i.getBindingReference());

        i = (BindingBeanInitializer) bs.getInitializers().get(1);

        assertEquals("fred", i.getPropertyName());
        assertEquals("ognl:flintstone", i.getBindingReference());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    /** @since 4.0 */

    public void testBeanSet() throws Exception
    {
        IComponentSpecification spec = parsePage("BeanSet.page");
        IBeanSpecification bs = spec.getBeanSpecification("target");

        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("literal", i.getPropertyName());
        assertEquals("literal-string", i.getBindingReference());

    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    /** @since 4.0 */

    public void testBeanDescription() throws Exception
    {
        IComponentSpecification cs = parseComponent("BeanDescription.jwc");
        IBeanSpecification bs = cs.getBeanSpecification("mybean");

        assertEquals("Description of mybean.", bs.getDescription());
        assertNotNull(bs.getLocation());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    /** @since 4.0 */

    public void testBeanProperty() throws Exception
    {
        IComponentSpecification cs = parseComponent("BeanDescription.jwc");
        IBeanSpecification bs = cs.getBeanSpecification("mybean");

        assertEquals("myvalue", bs.getProperty("myproperty"));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

     */

    public void testBeanInject() throws Exception
    {
        IComponentSpecification cs = parseComponent("BeanInject.jwc");
        IBeanSpecification bs = cs.getBeanSpecification("bean");
        assertEquals("myProperty", bs.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

     */

    public void testBeanInitializer() throws Exception
    {
        IComponentSpecification cs = parseComponent("BeanInitializer.jwc");
        IBeanSpecification bs = cs.getBeanSpecification("bean");

        List l = bs.getInitializers();
        LightweightBeanInitializer lbi = (LightweightBeanInitializer) l.get(0);

        assertEquals("foo=bar", lbi.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    public void testMessageBeanInitializer() throws Exception
    {
        IComponentSpecification spec = parsePage("MessageBeanInitializer.page");

        IBeanSpecification bs = spec.getBeanSpecification("fred");
        checkLine(bs, 24);
        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("barney", i.getPropertyName());
        assertEquals("message:rubble", i.getBindingReference());
        checkLine(i, 25);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    public void testExpressionBeanInitializer() throws Exception
    {
        IComponentSpecification spec = parsePage("ExpressionBeanInitializer_3_0.page");

        IBeanSpecification bs = spec.getBeanSpecification("zebean");

        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("barney", i.getPropertyName());
        assertEquals("ognl:rubble", i.getBindingReference());

        i = (BindingBeanInitializer) bs.getInitializers().get(1);

        assertEquals("fred", i.getPropertyName());
        assertEquals("ognl:flintstone", i.getBindingReference());
    }
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.