org.mmbase.bridge.jsp.taglib
Class StringListTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended byorg.mmbase.bridge.jsp.taglib.CloudReferrerTag
                  extended byorg.mmbase.bridge.jsp.taglib.NodeReferrerTag
                      extended byorg.mmbase.bridge.jsp.taglib.StringListTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, ContextProvider, javax.servlet.jsp.tagext.IterationTag, ListProvider, QueryContainerOrListProvider, java.io.Serializable, javax.servlet.jsp.tagext.Tag, TagIdentifier, Writer
Direct Known Subclasses:
AliasListTag, QueryNextBatchesTag, QueryPreviousBatchesTag

public class StringListTag
extends NodeReferrerTag
implements ListProvider, Writer

This class makes a tag which can list strings.

Since:
MMBase-1.7
Version:
$Id: StringListTag.java,v 1.15.2.2 2004/07/05 17:20:00 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Attribute comparator
           
protected  int currentItemIndex
           
protected  java.util.Iterator iterator
           
protected  Attribute max
           
protected  java.util.List returnList
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
parentNodeId
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
StringListTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
 ContextContainer getContextContainer()
           
 java.lang.Object getCurrent()
           
 int getIndex()
           
 int getIndexOffset()
           
protected  java.util.List getList()
          Creates the actual list of strings.
protected  int getMaxNumber()
           
 boolean isChanged()
           
 void remove()
          Removes the current item from the list.
 void setComparator(java.lang.String c)
           
 void setMax(java.lang.String m)
           
protected  void setNext()
           
 int size()
           
protected  void truncateList()
          For use with referid
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
findNodeProvider, findNodeProvider, getNode, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloud, getCloudContext, getCloudVar, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getId, getLocale, getObject, getPageContext, getReferid, getString, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setPageContext, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.jsp.taglib.TagIdentifier
getId
 
Methods inherited from interface org.mmbase.bridge.jsp.taglib.Writer
getWriterValue, haveBody, setEscape, setJspvar, setVartype, setWrite
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

returnList

protected java.util.List returnList

iterator

protected java.util.Iterator iterator

currentItemIndex

protected int currentItemIndex

max

protected Attribute max

comparator

protected Attribute comparator
Constructor Detail

StringListTag

public StringListTag()
Method Detail

size

public int size()
Specified by:
size in interface ListProvider
Returns:
the size of the list

getIndex

public int getIndex()
Specified by:
getIndex in interface ListProvider
Returns:
the index of the current item in a list

getIndexOffset

public int getIndexOffset()
Specified by:
getIndexOffset in interface ListProvider
Returns:
The offset of the index (normally this will return 1)

isChanged

public boolean isChanged()
Specified by:
isChanged in interface ListProvider
Returns:
a boolean indicating wether the field on which was sorted is changed.

getCurrent

public java.lang.Object getCurrent()
Specified by:
getCurrent in interface ListProvider
Returns:
the current item in a list

remove

public void remove()
Description copied from interface: ListProvider
Removes the current item from the list.

Specified by:
remove in interface ListProvider

setMax

public void setMax(java.lang.String m)
            throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getMaxNumber

protected int getMaxNumber()
                    throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setComparator

public void setComparator(java.lang.String c)
                   throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getContextContainer

public ContextContainer getContextContainer()
Specified by:
getContextContainer in interface ContextProvider

getList

protected java.util.List getList()
                          throws javax.servlet.jsp.JspTagException
Creates the actual list of strings.

Throws:
javax.servlet.jsp.JspTagException

truncateList

protected void truncateList()
                     throws javax.servlet.jsp.JspTagException
For use with referid

Throws:
javax.servlet.jsp.JspTagException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspTagException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
javax.servlet.jsp.JspTagException

setNext

protected void setNext()
                throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002