com.cc.framework.taglib.template
Class PutTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.cc.framework.taglib.template.PutTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, InnerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class PutTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements InnerTag

Tag handler for the put tag. Inserts a JSP-fragment in a template. The fragment can be specified either as an external JSP-file or directly in the tag-body. The tag may only be used within a <template:insert>-tag.

Since:
1.0
Version:
$Revision: 1.16 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String content
          The Content
private  boolean direct
          Output the content literal or as Web Resource
private  java.lang.String localeName
          Locale Name
private  java.lang.String name
          Field name
private static long serialVersionUID
          Serial Version UID
 
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
PutTag()
          Constructor
 
Method Summary
 int doAfterBody()
          Save the associated text from the body content (if any).
 int doEndTag()
           
 int doStartTag()
           
 void release()
           
 void setContent(java.lang.String content)
          Specifies the content of the JSP-fragment.
 void setDirect(java.lang.String direct)
          This attribute defines whether the contents should be interpreted as a literal or as a reference to an external file
 void setLocale(java.lang.String loc)
           
 void setName(java.lang.String name)
          Specifies the logical name of a JSP-fragment.
 void setPageContext(javax.servlet.jsp.PageContext arg0)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

name

private java.lang.String name
Field name


content

private java.lang.String content
The Content


direct

private boolean direct
Output the content literal or as Web Resource


localeName

private java.lang.String localeName
Locale Name

Constructor Detail

PutTag

public PutTag()
Constructor

Method Detail

setPageContext

public void setPageContext(javax.servlet.jsp.PageContext arg0)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.setPageContext(javax.servlet.jsp.PageContext)

release

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

doStartTag

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

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Save the associated text from the body content (if any).

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Returns:
int
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doEndTag()

setContent

public void setContent(java.lang.String content)
Specifies the content of the JSP-fragment. The HTML-code can also be alternatively specified diretly in the tag-body. The direct attribute determines whether the contents involve a literal or a reference to an external file. A filename is enhanced with the base directory if it starts with a $ character.

Note: If the content-attribute is specified, then the tag-body must be empty.

Parameters:
content - Content

setDirect

public void setDirect(java.lang.String direct)
               throws javax.servlet.jsp.JspException
This attribute defines whether the contents should be interpreted as a literal or as a reference to an external file

Parameters:
direct - Direct flag
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setName

public void setName(java.lang.String name)
Specifies the logical name of a JSP-fragment.

Note: The name must match with a placeholder in the JSP template used. The template is defined in the enclosing <template:insert>-tag.

Parameters:
name - The logical name of a JSP-fragment.

setLocale

public void setLocale(java.lang.String loc)
Parameters:
loc - Locale


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.