Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sitemesh.taglib.page
Class PanelTag  view PanelTag download PanelTag.java

java.lang.Object
  extended bycom.sitemesh.taglib.AbstractTag
      extended bycom.sitemesh.taglib.page.PanelTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, com.sitemesh.RequestConstants, javax.servlet.jsp.tagext.Tag

public class PanelTag
extends com.sitemesh.taglib.AbstractTag

This tag inserts an external resource as a panel into the current Page.

The page attribute is required and points to the panel resource which should expose an entire page (e.g. another JSP file producing HTML). This attribute can be relative to the page it is being called from or an absolute path from the context-root.

The (optional) decorator attribute is the name of the Decorator to apply to the included page. Note that the implementation of DecoratorMapper can overide this.

Version:
$Revision: 1.5 $

Field Summary
private  java.lang.String decorator
           
private  java.lang.String page
           
 
Fields inherited from class com.sitemesh.taglib.AbstractTag
pageContext, parent
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface com.sitemesh.RequestConstants
DECORATOR, FILTER_APPLIED, PAGE
 
Constructor Summary
PanelTag()
           
 
Method Summary
 int doEndTag()
          Standard taglib method: apply decorator to page.
private  com.sitemesh.Page getPage(java.lang.String page)
          Obtain Page object for page specified in setPage(java.lang.String) 55 .
private  com.sitemesh.Decorator getPanelDecorator(com.sitemesh.Page page)
          Obtain Decorator object for page specified in setDecorator(java.lang.String) 55 .
 void release()
          Standard taglib method: resets attributes.
 void setDecorator(java.lang.String decorator)
          Tag attribute: Name of Decorator to apply to Page.
 void setPage(java.lang.String page)
          Tag attribute: URI of page to include.
 
Methods inherited from class com.sitemesh.taglib.AbstractTag
doStartTag, getPage, getParent, setPageContext, setParent, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

page

private java.lang.String page

decorator

private java.lang.String decorator
Constructor Detail

PanelTag

public PanelTag()
Method Detail

setPage

public void setPage(java.lang.String page)
Tag attribute: URI of page to include. Can be relative to page being called from, or absolute path from context-root of web-app.


setDecorator

public void setDecorator(java.lang.String decorator)
Tag attribute: Name of Decorator to apply to Page. This is passed to DecoratorMapper to retrieve appropriate Decorator. DecoratorMapper may override if needed.


release

public void release()
Standard taglib method: resets attributes.


doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Standard taglib method: apply decorator to page.


getPage

private com.sitemesh.Page getPage(java.lang.String page)
                           throws java.io.IOException,
                                  javax.servlet.ServletException
Obtain Page object for page specified in setPage(java.lang.String) 55 .


getPanelDecorator

private com.sitemesh.Decorator getPanelDecorator(com.sitemesh.Page page)
                                          throws javax.servlet.ServletException
Obtain Decorator object for page specified in setDecorator(java.lang.String) 55 .