net.sourceforge.jstags.tags
Class JSTagsBodyTagSupport

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by net.sourceforge.jstags.tags.JSTagsBodyTagSupport
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
FormRules, Table

public abstract class JSTagsBodyTagSupport
extends javax.servlet.jsp.tagext.BodyTagSupport

It's a base class for defining the tag handlers of tags with a body Every tag extending this class will have the following components:

Since:
1.0
Author:
sschz@users.sourceforge.net
See Also:
Serialized Form

Field Summary
private static org.apache.log4j.Logger logger
          Logger for this class
private static long serialVersionUID
           
 
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
JSTagsBodyTagSupport()
           
 
Method Summary
 int doEndTag()
           
protected  java.lang.String getOutput()
          The tag code to be inserted in the jsp page will be retrieved by replacing, in the correct template, the previously set parameters
protected abstract  java.lang.String getTemplateName()
           
protected abstract  java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, 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

logger

private static final org.apache.log4j.Logger logger
Logger for this class


serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

JSTagsBodyTagSupport

public JSTagsBodyTagSupport()
Method Detail

doEndTag

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

getOutput

protected final java.lang.String getOutput()
                                    throws javax.servlet.jsp.JspException
The tag code to be inserted in the jsp page will be retrieved by replacing, in the correct template, the previously set parameters

Returns:
the JavaScript code that will perform the tag functionality
Throws:
javax.servlet.jsp.JspException

getTemplateName

protected abstract java.lang.String getTemplateName()
                                             throws javax.servlet.jsp.JspException
Returns:
name of the .JS template used to create the JavaScript code used by this tag
Throws:
javax.servlet.jsp.JspException

getTemplateNameValuePairs

protected abstract java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
Returns:
Map of [name, value] pairs representing all the name-value pairs used to create the JavaScript code. Such pairs will be used to replace data inside the .js template in order to adapt the JavaScript code to a certain effect.


Copyright © 2007. All Rights Reserved.