org.makumba.forms.tags
Class BasicValueTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableElement
org.makumba.analyser.AnalysableTag
org.makumba.commons.tags.GenericMakumbaTag
org.makumba.forms.tags.BasicValueTag
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag
- Direct Known Subclasses:
- InputTag, OptionTag
public abstract class BasicValueTag
- extends GenericMakumbaTag
This is a a base class for InputTag and OptionTag but may be used for other tags that need to compute a value in
similar manner (value="$attribute" or value="OQL expr").
- Version:
- $Id: BasicValueTag.java 1529 2007-09-13 23:33:10Z rosso_nero $
- Author:
- Cristian Bogdan, Manuel Gay
- See Also:
- Serialized Form
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, doAnalyzedStartTag, doEndTag, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, registerPossibleAttributeValues, setTagDataAtAnalysis, setTagKey |
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 |
ddp
protected DataDefinitionProvider ddp
valueExprOriginal
String valueExprOriginal
dataType
String dataType
expr
public String expr
fdp
protected FormDataProvider fdp
BasicValueTag
public BasicValueTag()
setValue
public void setValue(String value)
getForm
public FormTagBase getForm()
isNull
public boolean isNull()
- Indicates if the expression is null
- Returns:
true
if the expression is null, false
otherwise
isValue
boolean isValue()
isValue
protected boolean isValue(String exprexpression)
- Indicates if the given expression is a value
- Returns:
true
if the expression doesn't start with '$' and is not null, false
otherwise
isAttribute
protected boolean isAttribute()
- Indicates if the given expression is an attribute
- Returns:
true
if the expression starts with '$', false
otherwise
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
checkPtrExpr
public String checkPtrExpr(String expr2,
PageCache pageCache)
getTypeFromContext
abstract FieldDefinition getTypeFromContext(PageCache pageCache)
doEndAnalyze
public void doEndAnalyze(PageCache pageCache)
- Tells the ValueComputer to finish analysis, and sets the types for var and printVar.
- Overrides:
doEndAnalyze
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()
computedValue
abstract int computedValue(Object o,
FieldDefinition type)
throws JspException,
LogicException
- A value was computed, do what's needed with it, cleanup and return the result of doMakumbaEndTag()
- Parameters:
o
- the valuetype
- the type of the data
- Throws:
JspException
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 GenericMakumbaTag