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

public class IfTag extends jakarta.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:
  • Field Summary

    Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Collection inputCollection)
    Accepts input collection and make it accessible for tag.
    int
    Process the end tag.
    int
    Process the start tag for this instance.
     
    protected boolean
    If all conditions are matched deliver true, otherwise false.
    INTERNAL: Process the input collection and return the output collection.
    void
    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 jakarta.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 Details

    • IfTag

      public IfTag()
  • Method Details

    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspTagException
      Process the start tag for this instance.
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspTagException
    • doEndTag

      public int doEndTag() throws jakarta.servlet.jsp.JspException
      Process the end tag.
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException
    • release

      public void release()
      Resets the state of the Tag.
      Specified by:
      release in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      release in class jakarta.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:
    • 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