Class JSTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.JSTag
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
Direct Known Subclasses:
GoogleMapEntryTag, JSArrayTag, JSDateTag, JSMapTag, MapEntryTag

public abstract class JSTag extends jakarta.servlet.jsp.tagext.TagSupport
An abstract class to support JSP tags that render JavaScript data.
Since:
2.4
Version:
10.2
Author:
Luke
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The name of the Javascript variable to create.

    Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    final void
    setConst(boolean isConst)
    Marks the JavaScript variable as a constnt.
    final void
    setVar(String varName)
    Sets the JavaScript variable to create.
    protected void
    Writes the variable name to the JSP output stream

    Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

    doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _jsVarName

      protected String _jsVarName
      The name of the Javascript variable to create.
  • Constructor Details

    • JSTag

      public JSTag()
  • Method Details

    • setVar

      public final void setVar(String varName)
      Sets the JavaScript variable to create.
      Parameters:
      varName - the variable name
    • setConst

      public final void setConst(boolean isConst)
      Marks the JavaScript variable as a constnt.
      Parameters:
      isConst - TRUE if a constant, otherwise FALSE
    • release

      public void release()
      Specified by:
      release in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      release in class jakarta.servlet.jsp.tagext.TagSupport
    • writeVariableName

      protected void writeVariableName() throws IOException
      Writes the variable name to the JSP output stream
      Throws:
      IOException