com.webhydra.slug.tld
Class ClassDefTagHandler

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by com.webhydra.slug.tld.ClassDefTagHandler
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

public class ClassDefTagHandler
extends javax.servlet.jsp.tagext.SimpleTagSupport

Genrates all Slug related JavaScript Classes.

Inline and externl format are supported based on the src. If src parameter is ommited classes are defined inline. When src is specified, then external javascript definition is generated.
Two different formationgs - HTML 4.1 and XHTML 1.0 are supported and determined based on the xmlFormating property. When it is defined and set to true XHTML 1.0 script is generated. In all other cases HTML 4.1 compatible script is produced.

Version:
1.0
Author:
rossen

Field Summary
static java.lang.String JAVA_SCRIPT_SRC
          Constant holding the Slug JavaScript definitions.
 
Constructor Summary
ClassDefTagHandler()
           
 
Method Summary
 void doTag()
          Generates Slug related JavaScript opbjects.
 void setRawScript(boolean rawScript)
          Setter for property rawScript.
 void setSrc(java.lang.String value)
          Setter for the src attribute.
 void setXmlFormat(boolean value)
          Setter for the xml attribute.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_SCRIPT_SRC

public static final java.lang.String JAVA_SCRIPT_SRC
Constant holding the Slug JavaScript definitions.

Constructor Detail

ClassDefTagHandler

public ClassDefTagHandler()
Method Detail

doTag

public void doTag()
           throws javax.servlet.jsp.JspException
Generates Slug related JavaScript opbjects.

Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException

setSrc

public void setSrc(java.lang.String value)
Setter for the src attribute.

Parameters:
value - new value for the src property.

setXmlFormat

public void setXmlFormat(boolean value)
Setter for the xml attribute.

Parameters:
value - new value for the xml property.

setRawScript

public void setRawScript(boolean rawScript)
Setter for property rawScript.

Parameters:
rawScript - New value of property rawScript.