Class IfTag
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, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Collection inputCollection) Accepts input collection and make it accessible for tag.intdoEndTag()Process the end tag.intProcess the start tag for this instance.protected NavigatorDeciderIFgetDeciderInstance(String classname) protected booleanIf all conditions are matched deliver true, otherwise false.process(Collection input) INTERNAL: Process the input collection and return the output collection.voidrelease()Resets the state of the Tag.voidsetDecider(String classname) voidvoidsetGreaterThan(String greaterThanString) Sets Upper Bound test value against Collection size.voidsetLessThan(String lessThanString) Sets Lower Bound test value against Collection size.voidvoidsetSizeEquals(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
-
Constructor Details
-
IfTag
public IfTag()
-
-
Method Details
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspTagExceptionProcess the start tag for this instance.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionProcess the end tag.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
release
public void release()Resets the state of the Tag.- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-
matchCondition
protected boolean matchCondition()If all conditions are matched deliver true, otherwise false. -
process
Description copied from interface:ValueProducingTagIFINTERNAL: 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:
processin interfaceValueProducingTagIF- See Also:
-
accept
Description copied from interface:ValueAcceptingTagIFAccepts input collection and make it accessible for tag.- Specified by:
acceptin interfaceValueAcceptingTagIF
-
setName
-
setDecider
- Throws:
NavigatorRuntimeException
-
setEquals
-
setLessThan
Sets Lower Bound test value against Collection size.- Parameters:
lessThanString- try to convert to valid integer, otherwise fallback to default value (-1).
-
setGreaterThan
Sets Upper Bound test value against Collection size.- Parameters:
greaterThanString- try to convert to valid integer, otherwise fallback to default value (-1).
-
setSizeEquals
Sets exact equals size test value against Collection size.- Parameters:
equalsSizeString- try to convert to valid integer, otherwise fallback to default value (-1).
-
getDeciderInstance
- Throws:
NavigatorRuntimeException
-