FileDocCategorySizeDatePackage
ContainerTag.javaAPI DocExample1564Sat Nov 22 20:33:22 GMT 2003cvexample.view

ContainerTag

public class ContainerTag extends TagSupport
A custom tag for including containers within a JSP by name. This tag also contains nested ContainerIncludeTags, which use it to find their assoicated includes.

Fields Summary
private static final String
VIEW_ATTR
the name of the view in the request
private String
name
the name of the container
private View
view
the view assoicated with this container
Constructors Summary
Methods Summary
public intdoStartTag()
Determine if the named view exists. If it does, proceed with any nested tage. If it doesn't, just abort.

      
                              
           
        // find the view in the request
        view = (View) pageContext.getRequest().getAttribute(VIEW_ATTR);
        
        // see if it has the desired container
        if (!view.hasContainer(name))
            return SKIP_BODY;
        
        return EVAL_BODY_INCLUDE;
    
public java.lang.StringgetName()
Get the name of the container

        return name;
    
public ViewgetView()
Get the view associated with this container. Used by ContainerIncludeTag

        return view;
    
public voidsetName(java.lang.String value)
Called by the tag itself to set the name of the container

        name = value;