Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.IContainedComponent


        _componentResolver.resolve(cycle, container.getNamespace(), componentType, location);

        INamespace componentNamespace = _componentResolver.getNamespace();
        IComponentSpecification spec = _componentResolver.getSpecification();

        IContainedComponent contained = new ContainedComponent();
        contained.setLocation(location);
        contained.setType(componentType);

        IComponent result = instantiateComponent(
                page,
                container,
                componentId,
View Full Code Here


    }

    private void copyBindings(String sourceComponentId, IComponentSpecification cs,
            IContainedComponent target)
    {
        IContainedComponent source = cs.getComponent(sourceComponentId);
        if (source == null)
            throw new DocumentParseException(ParseMessages.unableToCopy(sourceComponentId),
                    getLocation());

        Iterator i = source.getBindingNames().iterator();
        while (i.hasNext())
        {
            String bindingName = (String) i.next();
            IBindingSpecification binding = source.getBinding(bindingName);
            target.setBinding(bindingName, binding);
        }

        target.setType(source.getType());
    }
View Full Code Here

                "name",
                PARAMETER_NAME_PATTERN,
                "invalid-parameter-name");
        String value = getAttribute("value");

        IContainedComponent cc = (IContainedComponent) peekObject();

        BindingSetter bs = new BindingSetter(cc, name, value);

        push(_elementName, bs, STATE_BINDING, false);
    }
View Full Code Here

    private void enterBinding_3_0()
    {
        String name = getAttribute("name");
        String expression = getAttribute("expression");

        IContainedComponent cc = (IContainedComponent) peekObject();

        BindingSetter bs = new BindingSetter(cc, name, expression);

        push(_elementName, bs, STATE_BINDING_3_0, false);
    }
View Full Code Here

            if (HiveMind.isBlank(type))
                throw new DocumentParseException(ParseMessages.missingTypeOrCopyOf(id),
                        getLocation());
        }

        IContainedComponent cc = _factory.createContainedComponent();
        cc.setType(type);
        cc.setCopyOf(copyOf);
        cc.setInheritInformalParameters(inherit);
        cc.setPropertyName(propertyName);

        IComponentSpecification cs = (IComponentSpecification) peekObject();

        cs.addComponent(id, cc);
View Full Code Here

        IBindingSpecification bs = _factory.createBindingSpecification();
        bs.setType(BindingType.INHERITED);
        bs.setValue(parameterName);

        IContainedComponent cc = (IContainedComponent) peekObject();

        cc.setBinding(name, bs);

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

    private void enterListenerBinding()
    {
        String name = getAttribute("name");
        String language = getAttribute("language");

        IContainedComponent cc = (IContainedComponent) peekObject();
        BindingSetter bs = new BindingSetter(cc, name, language);

        push(_elementName, bs, STATE_LISTENER_BINDING, false);
    }
View Full Code Here

        IBindingSpecification bs = _factory.createBindingSpecification();
        bs.setType(BindingType.PREFIXED);
        bs.setValue(BindingConstants.MESSAGE_PREFIX + ":" + key);
        bs.setLocation(getLocation());

        IContainedComponent cc = (IContainedComponent) peekObject();

        cc.setBinding(name, bs);

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

    private void enterStaticBinding_3_0()
    {
        String name = getAttribute("name");
        String expression = getAttribute("value");

        IContainedComponent cc = (IContainedComponent) peekObject();

        BindingSetter bs = new BindingSetter(cc, name, expression);

        push(_elementName, bs, STATE_STATIC_BINDING, false);
    }
View Full Code Here

    } finally { }}

    private void copyBindings(String sourceComponentId, IComponentSpecification cs,
            IContainedComponent target)
    {try { __CLOVER_225_0.M[2772]++;
        __CLOVER_225_0.S[11295]++;IContainedComponent source = cs.getComponent(sourceComponentId);
        __CLOVER_225_0.S[11296]++;if ((((source == null) && (++__CLOVER_225_0.CT[1961] != 0)) || (++__CLOVER_225_0.CF[1961] == 0))){
            __CLOVER_225_0.S[11297]++;throw new DocumentParseException(ParseMessages.unableToCopy(sourceComponentId),
                    getLocation(), null);}

        __CLOVER_225_0.S[11298]++;Iterator i = source.getBindingNames().iterator();
        __CLOVER_225_0.S[11299]++;while ((((i.hasNext()) && (++__CLOVER_225_0.CT[1962] != 0)) || (++__CLOVER_225_0.CF[1962] == 0))){
        {
            __CLOVER_225_0.S[11300]++;String bindingName = (String) i.next();
            __CLOVER_225_0.S[11301]++;IBindingSpecification binding = source.getBinding(bindingName);
            __CLOVER_225_0.S[11302]++;target.setBinding(bindingName, binding);
        }}

        __CLOVER_225_0.S[11303]++;target.setType(source.getType());
    } finally { }}
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.IContainedComponent

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.