Examples of IBeanSpecification


Examples of org.apache.tapestry.spec.IBeanSpecification

        bi.setPropertyName(name);
        bi.setBindingReference(BindingConstants.MESSAGE_PREFIX + ":" + key);
        bi.setLocation(getLocation());

        IBeanSpecification bs = (IBeanSpecification) peekObject();

        bs.addInitializer(bi);

        push(_elementName, null, STATE_NO_CONTENT);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        BindingBeanInitializer bi = _factory.createBindingBeanInitializer(_bindingSource);

        bi.setPropertyName(name);

        IBeanSpecification bs = (IBeanSpecification) peekObject();

        push(_elementName, new BeanSetPropertySetter(bs, bi, null, reference), STATE_SET, false);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        BindingBeanInitializer bi = _factory.createBindingBeanInitializer(_bindingSource);

        bi.setPropertyName(name);

        IBeanSpecification bs = (IBeanSpecification) peekObject();

        push(_elementName, new BeanSetPropertySetter(bs, bi, BindingConstants.OGNL_PREFIX + ":",
                expression), STATE_SET, false);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

            bean = _beans.get(name);

        if (bean != null)
            return bean;

        IBeanSpecification spec = _component.getSpecification().getBeanSpecification(name);

        if (spec == null)
            throw new ApplicationRuntimeException(Tapestry.format(
                    "BeanProvider.bean-not-defined",
                    _component.getExtendedId(),
                    name));

        bean = instantiateBean(name, spec);

        BeanLifecycle lifecycle = spec.getLifecycle();

        if (lifecycle == BeanLifecycle.NONE)
            return bean;

        if (_beans == null)
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

            String name = (String) e.getKey();

            if (spec == null)
                spec = _component.getSpecification();

            IBeanSpecification s = spec.getBeanSpecification(name);

            if (s.getLifecycle() == lifecycle)
            {
                Object bean = e.getValue();

                if (LOG.isDebugEnabled())
                    LOG.debug("Removing " + lifecycle.getName() + " bean " + name + ": " + bean);
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
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.