net.sourceforge.jstags.tags
Class JSTagsTagSupport
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sourceforge.jstags.tags.JSTagsTagSupport
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- AsyncCombo, AsyncContentLoader, DualCombo, Effect, Initialize, MultipleTab, Round, XSLTTransformer
public abstract class JSTagsTagSupport
- extends javax.servlet.jsp.tagext.TagSupport
It's a base class for defining the tag handlers of tags
with no body
Every tag extending this class will have the following components:
- Implementation class: it is in charge of gathering all the
information to create the javascript code used by the tag
- Template: it is a javascript file with the code used by a tag. It
contains a set of parameters(i.e. effect options, target element, ...)
that can be replaced with the particular values used by a tag invocation
- Parameters: set of pairs [name, value] with the values of every
parameter included in a template. This pairs will be used in order
to replace the variables included in a template and get the javascript
to include in a jsp at translation time
- 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.TagSupport |
id, pageContext |
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 |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final org.apache.log4j.Logger logger
- Logger for this class
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
JSTagsTagSupport
public JSTagsTagSupport()
doStartTag
public final 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.TagSupport
- 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. Such code 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 pair
used to create the JavaScript code. Such pairs will be used to replace data inside the .js
template in order to get the code of a certain effect.
Copyright © 2007. All Rights Reserved.