org.directwebremoting.jsp
Class ConvertTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.directwebremoting.jsp.ConvertTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class ConvertTag
extends javax.servlet.jsp.tagext.TagSupport

JSP tag to convert an object into javascript using the dwr converter manager Example usage: <%@ taglib uri="http://directwebremoting.org/dwr" prefix="dwr" %> <script%> var clientsideObject = <dwr:convert value="${myServersideObject}" /%>; </script%>

Author:
Lance Semmens
See Also:
Serialized Form

Field Summary
 
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
ConvertTag()
           
 
Method Summary
 int doEndTag()
           
 void setJson(boolean json)
          If json is false, the normal dwr javascript protocol is used.
 void setValue(java.lang.Object value)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertTag

public ConvertTag()
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.TagSupport
Throws:
javax.servlet.jsp.JspException

setValue

public void setValue(java.lang.Object value)
Parameters:
value - the value to be converted

setJson

public void setJson(boolean json)
If json is false, the normal dwr javascript protocol is used. If json is true, output will be a json response

Parameters:
json - flag for proper json output

Copyright 2008