atg.taglib.json
Class JsonArrayTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by atg.taglib.json.JsonBaseTag
          extended by atg.taglib.json.JsonArrayTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

public class JsonArrayTag
extends JsonBaseTag

Tag to represent a JSON array. The body of this tag should declare the template that will be used to represent each element in the array. Each element in the 'items' collection will be iterated over, and the body of the tag used to render each item in the array.
This tag should contain a single json:object element if each array element is an object, otherwise it should contain textual content, which will create an array of Strings

Version:
$Id$
Author:
James Wiltshire

Field Summary
protected  java.lang.Object mItems
           
protected  java.util.Collection mItemsCollection
          Raw items coerced to a Collection
protected  boolean mItemsPropertySet
          Flag to signify whether the items property was explicitly set
protected  java.lang.String mVar
           
 
Fields inherited from class atg.taglib.json.JsonBaseTag
mEscapeXmlOriginalValue, mEscapeXmlValueSet, mName, mNewStackCreated, mTrim, PRETTY_PRINT_INDENT
 
Constructor Summary
JsonArrayTag()
           
 
Method Summary
 void doTag()
          Process the tag
 java.lang.Object getItems()
          Gets the Items
 java.lang.String getVar()
          Gets the Var
 void setItems(java.lang.Object pItems)
          Sets the Items
 void setVar(java.lang.String pVar)
          Sets the Var
 
Methods inherited from class atg.taglib.json.JsonBaseTag
createEntityStack, entityStackExists, getCurrentEntity, getDefaultValue, getEntityStack, getEscapeXml, getEscapeXmlDefault, getName, getPrettyPrintIndentFactor, getTrim, isRootTag, processTagEnd, removeEntityStack, resetEscapeXmlValue, setEscapeXml, setName, setPrettyPrint, setTrim, trimAndEscapeValue
 
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

mVar

protected java.lang.String mVar

mItems

protected java.lang.Object mItems

mItemsCollection

protected java.util.Collection mItemsCollection
Raw items coerced to a Collection


mItemsPropertySet

protected boolean mItemsPropertySet
Flag to signify whether the items property was explicitly set

Constructor Detail

JsonArrayTag

public JsonArrayTag()
Method Detail

getVar

public java.lang.String getVar()
Gets the Var

Returns:
the Var

setVar

public void setVar(java.lang.String pVar)
Sets the Var

Parameters:
pVar - The Var to set

getItems

public java.lang.Object getItems()
Gets the Items

Returns:
the Items

setItems

public void setItems(java.lang.Object pItems)
Sets the Items

Parameters:
pItems - The Items to set

doTag

public void doTag()
           throws javax.servlet.jsp.JspException
Process the tag

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


Copyright © 2008 Art Technology Group, Inc. (ATG). All Rights Reserved.