org.makumba.list.tags
Class IfTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableTag
org.makumba.commons.tags.GenericMakumbaTag
org.makumba.list.tags.GenericListTag
org.makumba.list.tags.IfTag
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag
public class IfTag
- extends GenericListTag
- implements BodyTag
If tag will accept test="..." similar to value tag, and will show body only if OQL expression evaluates to true
(integer 1).
- Since:
- makumba-0.5.9.11
- Version:
- $Id: IfTag.java 3529 2009-01-02 16:19:29Z rosso_nero $
- Author:
- Frederik Habilis
- See Also:
- Serialized Form
|
Constructor Summary |
IfTag()
|
| Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag |
doAnalyzedCleanup, doStartTag, getParams, initialiseState, setAddTitle, setCols, setConvertLinks, setDefault, setElementSeparator, setEllipsis, setEllipsisLength, setEmpty, setFormat, setHtml, setLabelSeparator, setLineSeparator, setLongLineLength, setMaxlength, setMaxLength, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRows, setSize, setStyle, setStyleClass, setStyleId, setTitle, setType, setType, setUrlEncode |
| Methods inherited from class org.makumba.analyser.AnalysableTag |
addTagText, allowsIdenticalKey, canHaveBody, checkValidAttributeValues, doAnalyzedEndTag, getAnalyzedTag, getCurrentBodyTag, getPageCache, getPageContext, getPageTextInfo, getRunningTag, getTagKey, getTagText, getThreadTagStack, initializeThread, needPageCache, onlyInt, setTagDataAtAnalysis |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
testExpr
String testExpr
IfTag
public IfTag()
setTest
public void setTest(String s)
setBodyContent
public void setBodyContent(BodyContent bc)
- Specified by:
setBodyContent in interface BodyTag
doInitBody
public void doInitBody()
- Specified by:
doInitBody in interface BodyTag
setTagKey
public void setTagKey(PageCache pageCache)
- Sets tagKey to uniquely identify this tag. Called at analysis time before doStartAnalyze() and at runtime before
doMakumbaStartTag()
- Overrides:
setTagKey in class AnalysableTag
- Parameters:
pageCache - the page cache of the current page- See Also:
AnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache),
AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)
doStartAnalyze
public void doStartAnalyze(PageCache pageCache)
- Determines the ValueComputer and associates it with the tagKey .
If we use Hibernate we need to adjust the syntax
- Overrides:
doStartAnalyze in class AnalysableTag
- Parameters:
pageCache - the page cache of the current page
FIXME QueryExecutionProvider should tell us the syntax for the if boolean test
doEndAnalyze
public void doEndAnalyze(PageCache pageCache)
- Tells the ValueComputer to finish analysis, check for proper test result type
- Overrides:
doEndAnalyze in class AnalysableTag
- Parameters:
pageCache - the page cache of the current page
doAnalyzedStartTag
public int doAnalyzedStartTag(PageCache pageCache)
throws JspException,
LogicException
- Asks the ValueComputer to calculate the expression, and SKIP_BODY if false.
- Overrides:
doAnalyzedStartTag in class AnalysableTag
- Parameters:
pageCache - the page cache of the current page
- Throws:
JspException
LogicException- See Also:
AnalysableTag.doStartTag()
toString
public String toString()
- Overrides:
toString in class GenericMakumbaTag