org.apache.wiki.tags
Class IteratorTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.wiki.tags.IteratorTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
AdminBeanIteratorTag, AttachmentsIteratorTag, EditorIteratorTag, HistoryIteratorTag, SearchResultIteratorTag

public abstract class IteratorTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally

Iterates through tags.

Attributes

Since:
2.0
See Also:
Serialized Form

Field Summary
protected  Iterator m_iterator
           
protected  String m_pageName
           
protected  WikiContext m_wikiContext
           
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, 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
IteratorTag()
           
 
Method Summary
 void clearList()
          Clears the iterator away.
 int doAfterBody()
          
 void doCatch(Throwable arg0)
          In case your tag throws an exception at any point, you can override this method and implement a custom exception handler.
 int doEndTag()
          
 void doFinally()
          Executed after the tag has been finished.
 int doStartTag()
          
 void resetIterator()
          Override this method to reset your own iterator.
 void setList(Collection arg)
          Sets the collection that is used to form the iteration.
 void setList(Object[] arg)
          Sets the collection list, but using an array.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

m_pageName

protected String m_pageName

m_iterator

protected Iterator m_iterator

m_wikiContext

protected WikiContext m_wikiContext
Constructor Detail

IteratorTag

public IteratorTag()
Method Detail

setList

public void setList(Collection arg)
Sets the collection that is used to form the iteration.

Parameters:
arg - A Collection which will be iterated.

setList

public void setList(Object[] arg)
Sets the collection list, but using an array.

Parameters:
arg - An array of objects which will be iterated.

clearList

public void clearList()
Clears the iterator away. After calling this method doStartTag() will always return SKIP_BODY


resetIterator

public void resetIterator()
Override this method to reset your own iterator.


doStartTag

public int doStartTag()

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport

doEndTag

public int doEndTag()

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport

doAfterBody

public int doAfterBody()

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport

doCatch

public void doCatch(Throwable arg0)
             throws Throwable
In case your tag throws an exception at any point, you can override this method and implement a custom exception handler.

By default, this handler does nothing.

Specified by:
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinally
Parameters:
arg0 - The Throwable that the tag threw
Throws:
Throwable - I have no idea why this would throw anything

doFinally

public void doFinally()
Executed after the tag has been finished. This is a great place to put any cleanup code. However you must call super.doFinally() if you override this method, or else some of the things may not work as expected.

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.