Package org.opencms.jsp.jsonpart
Class CmsJspTagJsonPart
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.opencms.jsp.jsonpart.CmsJspTagJsonPart
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
,javax.servlet.jsp.tagext.TryCatchFinally
public class CmsJspTagJsonPart extends javax.servlet.jsp.tagext.TagSupport implements javax.servlet.jsp.tagext.TryCatchFinally
Tag used to convert the HTML output of this tag's contents to encoded JSON.It only makes sense to use this tag in combination with the servlet filter org.opencms.jsp.jsonpart.CmsJsonPartFilter. This tag converts the text generated by its contained JSP code and converts it into a special encoded form, which is then used by the filter to generate JSON. The 'element' attribute on this tag can be used to control the JSON key which will be used for the content.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsJspTagJsonPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doCatch(java.lang.Throwable arg0)
int
doEndTag()
void
doFinally()
int
doStartTag()
java.lang.String
getElement()
Returns the name to be used as the JSON key.void
setElement(java.lang.String elementName)
Sets the name to be used as a JSON key.
-
-
-
Constructor Detail
-
CmsJspTagJsonPart
public CmsJspTagJsonPart()
-
-
Method Detail
-
doCatch
public void doCatch(java.lang.Throwable arg0) throws java.lang.Throwable
- Specified by:
doCatch
in interfacejavax.servlet.jsp.tagext.TryCatchFinally
- Throws:
java.lang.Throwable
- See Also:
TryCatchFinally.doCatch(java.lang.Throwable)
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
TagSupport.doEndTag()
-
doFinally
public void doFinally()
- Specified by:
doFinally
in interfacejavax.servlet.jsp.tagext.TryCatchFinally
- See Also:
TryCatchFinally.doFinally()
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
TagSupport.doStartTag()
-
getElement
public java.lang.String getElement()
Returns the name to be used as the JSON key.- Returns:
- the name to be used as a JSON key
-
setElement
public void setElement(java.lang.String elementName)
Sets the name to be used as a JSON key.- Parameters:
elementName
- the name to be used as a JSON key
-
-