org.makumba.forms.tags
Class CriterionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.makumba.analyser.AnalysableElement
          extended by org.makumba.analyser.AnalysableTag
              extended by org.makumba.commons.tags.GenericMakumbaTag
                  extended by org.makumba.forms.tags.CriterionTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class CriterionTag
extends GenericMakumbaTag
implements BodyTag

Version:
$Id: CriterionTag.java,v 1.1 Oct 21, 2007 1:37:37 PM rudi Exp $
Author:
Rudolf Mayer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement
AnalysableElement.FilePositionElementComparator
 
Field Summary
 
Fields inherited from class org.makumba.commons.tags.GenericMakumbaTag
extraFormatting, extraFormattingParams, NEEDED_RESOURCES, params
 
Fields inherited from class org.makumba.analyser.AnalysableTag
ATTRIBUTE_VALUES_TRUE_FALSE, tagData, tagKey, TYPES
 
Fields inherited from class org.makumba.analyser.AnalysableElement
ANALYSIS_STATE
 
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
CriterionTag()
           
 
Method Summary
 boolean allowsIdenticalKey()
          Determines whether the tag can have the same key as others in the page
protected  void doAnalyzedCleanup()
          Called by doEndTag in its finally block.
 int doAnalyzedEndTag(PageCache pageCache)
          makumba-specific endTag
 int doAnalyzedStartTag(PageCache pageCache)
          This always returns EVAL_BODY_TAG so we make sure doInitBody() is called
 void doEndAnalyze(PageCache pageCache)
          End the analysis of the tag, after all tags in the page were visited.
 void doInitBody()
           
 void doStartAnalyze(PageCache pageCache)
          Determines the ValueComputer and associates it with the tagKey
 FieldDefinition getFieldDefinition(PageCache pageCache)
           
 String[] getFieldsSplit()
           
 SearchTag getForm()
           
 String getInputName()
           
 String getMatchMode()
           
 FieldDefinition getTypeFromContext(PageCache pageCache)
           
 boolean isRange()
           
protected  void registerPossibleAttributeValues()
          Override this in order to register possible attribute values using AnalysableTag.registerAttributeValues(String, String...).
 void setBodyContent(BodyContent b)
           
 void setFields(String s)
           
 void setHasMatchMode(boolean hasMatchMode)
           
 void setIsRange(String isRange)
           
 void setMatchMode(String matchMode)
           
 void setTagKey(PageCache pageCache)
          Sets tagKey to uniquely identify this tag.
 
Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag
doStartTag, getParams, initialiseState, isAttribute, setAddTitle, setCols, 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, toString
 
Methods inherited from class org.makumba.analyser.AnalysableTag
addTagText, canHaveBody, checkAttributeValues, doEndTag, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, setTagDataAtAnalysis
 
Methods inherited from class org.makumba.analyser.AnalysableElement
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

CriterionTag

public CriterionTag()
Method Detail

getForm

public SearchTag getForm()

doStartAnalyze

public void doStartAnalyze(PageCache pageCache)
Determines the ValueComputer and associates it with the tagKey

Overrides:
doStartAnalyze in class AnalysableTag
Parameters:
pageCache - the page cache of the current page

doAnalyzedEndTag

public int doAnalyzedEndTag(PageCache pageCache)
                     throws JspException,
                            LogicException
Description copied from class: AnalysableTag
makumba-specific endTag

Overrides:
doAnalyzedEndTag in class AnalysableTag
Parameters:
pageCache - The page cache for the current page
Throws:
JspException
LogicException
See Also:
AnalysableTag.doEndTag()

doAnalyzedStartTag

public int doAnalyzedStartTag(PageCache pageCache)
This always returns EVAL_BODY_TAG so we make sure doInitBody() is called

Overrides:
doAnalyzedStartTag in class AnalysableTag
Parameters:
pageCache - the page cache of the current page
See Also:
AnalysableTag.doStartTag()

setHasMatchMode

public void setHasMatchMode(boolean hasMatchMode)

doEndAnalyze

public void doEndAnalyze(PageCache pageCache)
Description copied from class: AnalysableTag
End the analysis of the tag, after all tags in the page were visited.

Overrides:
doEndAnalyze in class AnalysableTag
Parameters:
pageCache - The page cache for the current page

setFields

public void setFields(String s)

getFieldsSplit

public String[] getFieldsSplit()

doInitBody

public void doInitBody()
                throws JspException
Specified by:
doInitBody in interface BodyTag
Throws:
JspException

setBodyContent

public void setBodyContent(BodyContent b)
Specified by:
setBodyContent in interface BodyTag

getTypeFromContext

public FieldDefinition getTypeFromContext(PageCache pageCache)

setTagKey

public void setTagKey(PageCache pageCache)
Description copied from class: AnalysableTag
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 for the current page
See Also:
AnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache), AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)

allowsIdenticalKey

public boolean allowsIdenticalKey()
Description copied from class: AnalysableTag
Determines whether the tag can have the same key as others in the page

Overrides:
allowsIdenticalKey in class AnalysableTag
Returns:
true if the tag is allowed to have the same key as others in the page, false otherwise

getInputName

public String getInputName()

getFieldDefinition

public FieldDefinition getFieldDefinition(PageCache pageCache)

isRange

public boolean isRange()

setIsRange

public void setIsRange(String isRange)

setMatchMode

public void setMatchMode(String matchMode)

registerPossibleAttributeValues

protected void registerPossibleAttributeValues()
Description copied from class: AnalysableTag
Override this in order to register possible attribute values using AnalysableTag.registerAttributeValues(String, String...). The registered attributes are checked before AnalysableTag.doStartAnalyze(PageCache) and throw a ProgrammerError is thrown if the provided value is not allowed.

Overrides:
registerPossibleAttributeValues in class AnalysableTag

doAnalyzedCleanup

protected void doAnalyzedCleanup()
Description copied from class: AnalysableTag
Called by doEndTag in its finally block. Use it to clean references that will not be used next time the servlet container uses the tag object.

Overrides:
doAnalyzedCleanup in class GenericMakumbaTag

getMatchMode

public String getMatchMode()