Package org.apache.tapestry5.internal.structure

Examples of org.apache.tapestry5.internal.structure.ComponentPageElement


        request.setAttribute(InternalConstants.CONTENT_TYPE_ATTRIBUTE_NAME, contentType);

        Page containerPage = cache.get(parameters.getContainingPageName());

        ComponentPageElement element = containerPage.getComponentElementByNestedId(parameters.getNestedComponentId());

        // In many cases, the triggered element is a Form that needs to be able to
        // pass its event handler return values to the correct result processor.
        // This is certainly the case for forms.

        environment.push(ComponentEventResultProcessor.class, interceptor);

        element.triggerContextEvent(parameters.getEventType(), parameters.getEventContext(), callback);

        environment.pop(ComponentEventResultProcessor.class);

        if (queue.isPartialRenderInitialized())
        {
View Full Code Here


            {
                Page page = new PageImpl(logicalPageName, selector, persistentFieldManager, perThreadManager);

                ComponentAssembler assembler = getAssembler(pageClassName, selector);

                ComponentPageElement rootElement = assembler.assembleRootComponent(page);

                page.setRootElement(rootElement);

                // The page is *loaded* before it is attached to the request.
                // This is to help ensure that no client-specific information leaks
View Full Code Here

        {
            public void execute(PageAssembly pageAssembly)
            {
                String parameterName = token.getName();

                ComponentPageElement element = pageAssembly.createdElement.peek();

                BlockImpl block = new BlockImpl(token.getLocation(), interner.format("Parameter %s of %s",
                        parameterName, element.getCompleteId()));

                Binding binding = new LiteralBinding(token.getLocation(), "block parameter " + parameterName, block);

                EmbeddedComponentAssembler embeddedAssembler = pageAssembly.embeddedAssembler.peek();

                ParameterBinder binder = embeddedAssembler.createParameterBinder(parameterName);

                if (binder == null) { throw new TapestryException(PageloadMessages.parameterNotSupported(
                        element.getCompleteId(), parameterName), token.getLocation(), null); }

                binder.bind(pageAssembly.createdElement.peek(), binding);

                pageAssembly.bodyElement.push(block);
            }
View Full Code Here

        {
            public void execute(PageAssembly pageAssembly)
            {
                String blockId = token.getId();

                ComponentPageElement element = pageAssembly.activeElement.peek();

                String description = blockId == null ? interner.format("Anonymous within %s", element.getCompleteId())
                        : interner.format("%s within %s", blockId, element.getCompleteId());

                BlockImpl block = new BlockImpl(token.getLocation(), description);

                if (blockId != null)
                    element.addBlock(blockId, block);

                // Start directing template content into the Block
                pageAssembly.bodyElement.push(block);
            }
        });
View Full Code Here

            assembler.add(new PageAssemblyAction()
            {
                public void execute(PageAssembly pageAssembly)
                {
                    final ComponentPageElement container = pageAssembly.activeElement.peek();
                    final ComponentPageElement embedded = pageAssembly.createdElement.peek();

                    pageAssembly.deferred.add(new PageAssemblyAction()
                    {
                        public void execute(PageAssembly pageAssembly)
                        {
View Full Code Here

                    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

            public void execute(PageAssembly pageAssembly)
            {
                // At the time this action executes, we'll be able to capture the containing and embedded
                // component. We can then defer the connection logic until after all other construction.

                final ComponentPageElement container = pageAssembly.activeElement.peek();
                final ComponentPageElement embedded = pageAssembly.createdElement.peek();

                // Parameters are normally bound bottom to top. Inherited parameters run differently, and should be
                // top to bottom.
                pageAssembly.deferred.add(new PageAssemblyAction()
                {
View Full Code Here

                        elementName, embeddedAssembler.getLocation());

                // ... which is why we can find it via peek() here. And it's our responsibility
                // to clean it up.

                ComponentPageElement embeddedElement = pageAssembly.createdElement.peek();

                // Add the new element to the template of its container.

                pageAssembly.addRenderCommand(embeddedElement);
View Full Code Here

    {
        context.add(new PageAssemblyAction()
        {
            public void execute(PageAssembly pageAssembly)
            {
                ComponentPageElement element = pageAssembly.activeElement.peek();

                pageAssembly.addRenderCommand(new RenderBodyElement(element));
            }
        });
    }
View Full Code Here

    {
        PageAssembly pageAssembly = new PageAssembly(page);

        try
        {
            ComponentPageElement newElement = new ComponentPageElementImpl(pageAssembly.page, instantiator, resources,
                    request, symbolSource);

            pageAssembly.componentName.push(new ComponentName(pageAssembly.page.getName()));

            pageAssembly.page.addLifecycleListener(newElement);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.structure.ComponentPageElement

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.