net.ontopia.topicmaps.nav2.taglibs.logic
Class IfTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.ontopia.topicmaps.nav2.taglibs.logic.IfTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, ValueAcceptingTagIF, ValueProducingTagIF

public class IfTag
extends javax.servlet.jsp.tagext.TagSupport
implements ValueProducingTagIF, ValueAcceptingTagIF

INTERNAL: Logic Tag for iterating over each object in a collection, creating new content for each iteration.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
IfTag()
           
 
Method Summary
 void accept(Collection inputCollection)
          Accepts input collection and make it accessible for tag.
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Process the start tag for this instance.
protected  NavigatorDeciderIF getDeciderInstance(String classname)
           
protected  boolean matchCondition()
          If all conditions are matched deliver true, otherwise false.
 Collection process(Collection input)
          INTERNAL: Process the input collection and return the output collection.
 void release()
          Resets the state of the Tag.
 void setDecider(String classname)
           
 void setEquals(String equalsVariableName)
           
 void setGreaterThan(String greaterThanString)
          Sets Upper Bound test value against Collection size.
 void setLessThan(String lessThanString)
          Sets Lower Bound test value against Collection size.
 void setName(String collectionName)
           
 void setSizeEquals(String equalsSizeString)
          Sets exact equals size test value against Collection size.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, 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
 

Constructor Detail

IfTag

public IfTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Process the start tag for this instance.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

release

public void release()
Resets the state of the Tag.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport

matchCondition

protected boolean matchCondition()
If all conditions are matched deliver true, otherwise false.


process

public Collection process(Collection input)
Description copied from interface: ValueProducingTagIF
INTERNAL: Process the input collection and return the output collection. This collection will afterwards typically be passed up to the parent tag, which should be a value-accepting tag.

Specified by:
process in interface ValueProducingTagIF
See Also:
BaseValueProducingTag

accept

public void accept(Collection inputCollection)
Description copied from interface: ValueAcceptingTagIF
Accepts input collection and make it accessible for tag.

Specified by:
accept in interface ValueAcceptingTagIF

setName

public void setName(String collectionName)

setDecider

public void setDecider(String classname)
                throws NavigatorRuntimeException
Throws:
NavigatorRuntimeException

setEquals

public void setEquals(String equalsVariableName)

setLessThan

public void setLessThan(String lessThanString)
Sets Lower Bound test value against Collection size.

Parameters:
lessThanString - try to convert to valid integer, otherwise fallback to default value (-1).

setGreaterThan

public void setGreaterThan(String greaterThanString)
Sets Upper Bound test value against Collection size.

Parameters:
greaterThanString - try to convert to valid integer, otherwise fallback to default value (-1).

setSizeEquals

public void setSizeEquals(String equalsSizeString)
Sets exact equals size test value against Collection size.

Parameters:
equalsSizeString - try to convert to valid integer, otherwise fallback to default value (-1).

getDeciderInstance

protected NavigatorDeciderIF getDeciderInstance(String classname)
                                         throws NavigatorRuntimeException
Throws:
NavigatorRuntimeException


Copyright © 2000-2012 Ontopia.