Examples of InternalComponentResources


Examples of org.apache.tapestry5.internal.InternalComponentResources

        train_getModel(ins, model);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, null, null, elementResources,
                "Foo.bar", null, ins, false);

        resources.storeRenderVariable("fred", "FRED");
        resources.storeRenderVariable("barney", "BARNEY");

        resources.postRenderCleanup();

        try
        {
            resources.getRenderVariable("fred");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

        page.addLifecycleListener(listener);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null,
                null, ins, false);

        resources.addPageLifecycleListener(listener);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

        train_getModel(ins, model);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null,
                null, ins, false);

        resources.bindParameter("bar", binding);

        assertNull(resources.getPropertyName("bar"));

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

        expect(binding.getPropertyName()).andReturn("foo");

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null,
                null, ins, false);

        resources.bindParameter("bar", binding);

        assertEquals(resources.getPropertyName("bar"), "foo");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

        ComputedValue<FieldConduit<Object>> computed = new ComputedValue<FieldConduit<Object>>()
        {
            public FieldConduit<Object> get(InstanceContext context)
            {
                InternalComponentResources resources = context.get(InternalComponentResources.class);
                return new PersistentFieldConduit(resources, logicalFieldName, defaultValue);
            }
        };

        field.setComputedConduit(computed);
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

                                               final String fieldName, final String[] possibleNames)
    {
        if (!resources.isMixin())
            throw new TapestryException(TransformMessages.bindParameterOnlyOnMixin(fieldName, resources), null);

        InternalComponentResources containerResources = (InternalComponentResources) resources.getContainerResources();

        // Evaluate this early so that we get a fast fail.

        String containerParameterName = identifyParameterName(resources, InternalUtils.stripMemberName(fieldName),
                possibleNames);
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

   
    embeddedComponentResourcesList.add(containerResources);
   
    while(!embeddedComponentResourcesList.isEmpty())
    {
      InternalComponentResources resources = embeddedComponentResourcesList.remove(0);
     
      ComponentModel containerComponentModel = resources.getComponentModel();
     
      for(String embeddedComponentId : containerComponentModel.getEmbeddedComponentIds())
      {
        EmbeddedComponentModel embeddedComponentModel = containerComponentModel
            .getEmbeddedComponentModel(embeddedComponentId);
       
        InternalComponentResources embeddedComponentResources = (InternalComponentResources) resources
            .getEmbeddedComponent(embeddedComponentId).getComponentResources();
        /**
           * If the parameter is not a formal parameter, then the parameter must be a published parameter
           * of an embeddedComponent of the component we are currently examining.
           */
        if(embeddedComponentModel.getPublishedParameters().contains(publishedParameterName)
            && embeddedComponentResources.getComponentModel().isFormalParameter(publishedParameterName))
        {
          return embeddedComponentResources;
        }
       
        embeddedComponentResourcesList.add(embeddedComponentResources);
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

        return new ComputedValue<FieldConduit<Object>>()
        {
            public FieldConduit get(InstanceContext context)
            {
                ComponentResources resources = context.get(ComponentResources.class);
                final InternalComponentResources icr = (InternalComponentResources) resources;

                return new ReadOnlyComponentFieldConduit(resources, fieldName)
                {
                    public Object get(Object instance, InstanceContext context)
                    {
                        return icr.getMixinByClassName(mixinClassName);
                    }
                };
            }
        };
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

                            new AvailableValues("Formal parameters", embeddedAssembler.getFormalParameterNames()));
                }

                final String defaultBindingPrefix = binder.getDefaultBindingPrefix(metaDefaultBindingPrefix);

                InternalComponentResources containerResources = pageAssembly.activeElement.peek()
                        .getComponentResources();

                ComponentPageElement embeddedElement = pageAssembly.createdElement.peek();
                InternalComponentResources embeddedResources = embeddedElement.getComponentResources();

                Binding binding = elementFactory.newBinding(parameterName, containerResources, embeddedResources,
                        defaultBindingPrefix, parameterValue, location);

                binder.bind(embeddedElement, binding);
View Full Code Here

Examples of org.apache.tapestry5.internal.InternalComponentResources

            {
                // A little extra weight for token containing one or more expansions.

                pageAssembly.weight++;

                InternalComponentResources resources = pageAssembly.activeElement.peek().getComponentResources();

                RenderCommand command = elementFactory.newAttributeElement(resources, token);

                pageAssembly.addRenderCommand(command);
            }
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.