com.opencms.flex.jsp
Class CmsJspTagTemplate

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--com.opencms.flex.jsp.CmsJspTagTemplate
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, Serializable, javax.servlet.jsp.tagext.Tag

public class CmsJspTagTemplate
extends javax.servlet.jsp.tagext.BodyTagSupport

Used to select various template elements form a JSP template that is included in another file.

Version:
$Revision: 1.6 $
Author:
Alexander Kandzior (a.kandzior@alkacon.com)
See Also:
Serialized Form

Field Summary
static String C_TEMPLATE_ELEMENT
          Template part identifier
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
CmsJspTagTemplate()
           
 
Method Summary
 int doStartTag()
           
 String getElement()
          Returns the include page/file target.
 void release()
           
 void setElement(String element)
          Sets the include page/file target.
static boolean templateTagAction(String element, CmsFlexRequest req)
          Internal action method.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

C_TEMPLATE_ELEMENT

public static final String C_TEMPLATE_ELEMENT
Template part identifier

See Also:
Constant Field Values
Constructor Detail

CmsJspTagTemplate

public CmsJspTagTemplate()
Method Detail

setElement

public void setElement(String element)
Sets the include page/file target.


getElement

public String getElement()
Returns the include page/file target.

Returns:
String

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport
See Also:
Tag.release()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
See Also:
Tag.doStartTag()

templateTagAction

public static boolean templateTagAction(String element,
                                        CmsFlexRequest req)
Internal action method.

Parameters:
element - the selected element
req - the current request
Returns:
boolean true if this element should be inclued, false otherwise