org.makumba.forms.tags
Class OptionTag

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.BasicValueTag
                      extended by org.makumba.forms.tags.OptionTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class OptionTag
extends BasicValueTag
implements BodyTag

mak:option tag

Version:
$Id: OptionTag.java 5151 2010-05-18 19:07:27Z rosso_nero $
Author:
Cristian Bogdan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement
AnalysableElement.FilePositionElementComparator
 
Field Summary
(package private)  BodyContent bodyContent
           
 
Fields inherited from class org.makumba.forms.tags.BasicValueTag
dataType, ddp, expr, fdp, valueExprOriginal
 
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
OptionTag()
           
 
Method Summary
(package private)  int computedValue(Object val, FieldDefinition type)
          A value was computed, do what's needed with it, cleanup and return the result of doMakumbaEndTag()
protected  void doAnalyzedCleanup()
          Called by doEndTag in its finally block.
 int doAnalyzedStartTag(PageCache pageCache)
          makumba-specific startTag.
 void doInitBody()
           
 void doStartAnalyze(PageCache pageCache)
          Determines the ValueComputer and associates it with the tagKey
(package private)  InputTag getInput()
           
(package private)  FieldDefinition getTypeFromContext(PageCache pageCache)
           
 void setBodyContent(BodyContent bc)
           
 void setTagKey(PageCache pageCache)
          Sets tagKey to uniquely identify this tag.
 
Methods inherited from class org.makumba.forms.tags.BasicValueTag
checkPtrExpr, doAnalyzedEndTag, doEndAnalyze, getForm, isAttribute, isNull, isValue, isValue, setValue
 
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, allowsIdenticalKey, canHaveBody, checkAttributeValues, doEndTag, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, registerPossibleAttributeValues, 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
 

Field Detail

bodyContent

BodyContent bodyContent
Constructor Detail

OptionTag

public OptionTag()
Method Detail

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 for the current page
See Also:
AnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache), AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)

getInput

InputTag getInput()

getTypeFromContext

FieldDefinition getTypeFromContext(PageCache pageCache)
Specified by:
getTypeFromContext in class BasicValueTag

doStartAnalyze

public void doStartAnalyze(PageCache pageCache)
Description copied from class: BasicValueTag
Determines the ValueComputer and associates it with the tagKey

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

doInitBody

public void doInitBody()
Specified by:
doInitBody in interface BodyTag

setBodyContent

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

doAnalyzedStartTag

public int doAnalyzedStartTag(PageCache pageCache)
Description copied from class: AnalysableTag
makumba-specific startTag.

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

computedValue

int computedValue(Object val,
                  FieldDefinition type)
            throws JspException,
                   LogicException
A value was computed, do what's needed with it, cleanup and return the result of doMakumbaEndTag()

Specified by:
computedValue in class BasicValueTag
Parameters:
val - the computed value
type - the type of the value
Throws:
JspException
{@link - LogicException}
LogicException

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 BasicValueTag