Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2009 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
 //     http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.internal.pageload;
Mutable data used when ComponentAssemblers are assembling a page instance.
    final Page page;
    final Stack<ComponentPageElementactiveElement = CollectionFactory.newStack();
    final Stack<BodyPageElementbodyElement = CollectionFactory.newStack();
    final Stack<ComponentPageElementcreatedElement = CollectionFactory.newStack();
    final Stack<ComponentNamecomponentName = CollectionFactory.newStack();
    final Stack<EmbeddedComponentAssemblerembeddedAssembler = CollectionFactory.newStack();
    final List<PageAssemblyActiondeferred = CollectionFactory.newList();
    private final Set<Stringflags = CollectionFactory.newSet();
    PageAssembly(Page page)
    {
        this. = page;
    }

    
Adds the command to the top element of the bodyElement stack. flushComposableRenderCommands() composable render commands first.

Parameters:
command
    void addRenderCommand(RenderCommand command)
    {
        .peek().addToBody(command);
    }
    boolean checkAndSetFlag(String flagName)
    {
        boolean result = .contains(flagName);
        if (!result)
            .add(flagName);
        return result;
    }
    void checkForRecursion(String componentClassNameLocation location)
    {
        for (Object o : .getSnapshot())
        {
            ComponentPageElement e = (ComponentPageElemento;
            if (e.getComponentResources().getComponentModel().getComponentClassName().equals(componentClassName))
            {
                throw new TapestryException(
                        PageloadMessages.recursiveTemplate(componentClassName),
                        location
                        null);
            }
        }
    }
New to GrepCode? Check out our FAQ X