ContainerTagpublic 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_ATTRthe name of the view in the request | private String | namethe name of the container | private View | viewthe view assoicated with this container |
Methods Summary |
---|
public int | doStartTag()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.String | getName()Get the name of the container
return name;
| public View | getView()Get the view associated with this container. Used by
ContainerIncludeTag
return view;
| public void | setName(java.lang.String value)Called by the tag itself to set the name of the container
name = value;
|
|