Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.ContainedComponent


        _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


   
    public void test_Unable_To_Copy()
    {       
        IComponentSpecification spec = new ComponentSpecification();

        IContainedComponent ccOne = new ContainedComponent();
        ccOne.setType("Insert");
        spec.addComponent("time", ccOne);
       
        IContainedComponent ccTwo = new ContainedComponent();
        ccTwo.setCopyOf("date");
        spec.addComponent("invalid", ccTwo);

        try
        {
            new ComponentHousekeepingWorker().performEnhancement(null, spec);
View Full Code Here

   
    public void test_CopyOf_Valid()
    {       
        IComponentSpecification spec = new ComponentSpecification();

        IContainedComponent ccOne = new ContainedComponent();
        ccOne.setType("Insert");
        ccOne.setBinding("value", new BindingSpecification());
        spec.addComponent("time", ccOne);
       
       
        IContainedComponent ccTwo = new ContainedComponent();
        ccTwo.setCopyOf("time");
        spec.addComponent("valid", ccTwo);
        assertNull( ccTwo.getBinding("value") );

        new ComponentHousekeepingWorker().performEnhancement(null, spec);
       
        IContainedComponent result = spec.getComponent("valid");
        assertEquals(result, ccTwo);
View Full Code Here

    {
        Component component = method.getAnnotation(Component.class);

        String propertyName = AnnotationUtils.getPropertyName(method);

        IContainedComponent cc = new ContainedComponent();

        cc.setInheritInformalParameters(component.inheritInformalParameters());
        cc.setType(component.type());
        cc.setPropertyName(propertyName);
        cc.setLocation(location);

        for (String binding : component.bindings())
        {
            addBinding(cc, binding, location);
        }
View Full Code Here

        BindingSpecification bspec = new BindingSpecification();
        bspec.setType(BindingType.PREFIXED);
        bspec.setValue("an-expression");
        bspec.setLocation(l);

        ContainedComponent contained = new ContainedComponent();
        contained.setBinding("barney", bspec);
        contained.setType("FredComponent");

        IComponentSpecification spec = new ComponentSpecification();
        spec.addParameter(pspec);

        component.getSpecification();
View Full Code Here

        BindingSpecification bspec = new BindingSpecification();
        bspec.setType(BindingType.PREFIXED);
        bspec.setValue("an-expression");
        bspec.setLocation(l);

        ContainedComponent contained = new ContainedComponent();
        contained.setBinding("fred", bspec);
        contained.setType("FredComponent");

        IComponentSpecification spec = new ComponentSpecification();
        spec.addParameter(pspec);

        component.getSpecification();
View Full Code Here

public class TestInjectComponentWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String componentId, String propertyName,
            Location location)
    {
        IContainedComponent cc = new ContainedComponent();
        cc.setPropertyName(propertyName);
        cc.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getComponentIds();
View Full Code Here

        _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

public class TestInjectComponentWorker extends BaseComponentTestCase
{
    private IComponentSpecification newSpec(String componentId, String propertyName,
            Location location)
    {
        IContainedComponent cc = new ContainedComponent();
        cc.setPropertyName(propertyName);
        cc.setLocation(location);
       
        IComponentSpecification spec = newSpec();

        expect(spec.getComponentIds()).andReturn(Collections.singletonList(componentId));
View Full Code Here

TOP

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

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.