org.makumba.list.tags
Class GenericListTag

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.list.tags.GenericListTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
IfTag, QueryTag, ValueTag

public abstract class GenericListTag
extends GenericMakumbaTag

This class provides utility methods for all makumba tags, such as

It extends AnalysableTag which enables JSP analysis support. FIXME form classes extend this one because they need to compute the base pointers and dummy queries. this dependency needs to be removed.

Version:
$Id: MakumbaTag.java 1546 2007-09-14 20:34:45Z manuel_gay $
Author:
Cristian Bogdan, Manuel Gay
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement
AnalysableElement.FilePositionElementComparator
 
Field Summary
protected  FormDataProvider fdp
           
 
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.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GenericListTag()
           
 
Method Summary
 void addToParentListKey(Object o)
          Adds a key to the parentList, verifies if the tag has a parent.
 int doEndTag()
          Handles exceptions and calls doMakumbaEndTag()
 String getDatabaseName()
          Obtains the makumba database; this can be more complex (accept arguments, etc)
static String getDataSourceName(PageContext pc)
          Obtains the makumba database; this can be more complex (accept arguments, etc)
protected  void onlyRootArgument(String s)
          Checks if this is not the root tag and throws an exception containing the name of the argument not allowed in non-root tags.
 void setDb(String db)
          Sets the database argument
 
Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag
doAnalyzedCleanup, 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, doAnalyzedEndTag, doAnalyzedStartTag, doEndAnalyze, doStartAnalyze, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fdp

protected FormDataProvider fdp
Constructor Detail

GenericListTag

public GenericListTag()
Method Detail

doEndTag

public int doEndTag()
             throws JspException
Description copied from class: AnalysableTag
Handles exceptions and calls doMakumbaEndTag()

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class AnalysableTag
Throws:
JspException

addToParentListKey

public void addToParentListKey(Object o)
Adds a key to the parentList, verifies if the tag has a parent.

Parameters:
o - The key to be added

getDatabaseName

public String getDatabaseName()
Obtains the makumba database; this can be more complex (accept arguments, etc)

Returns:
A String containing the name of the database

getDataSourceName

public static String getDataSourceName(PageContext pc)
Obtains the makumba database; this can be more complex (accept arguments, etc)

Parameters:
pc - The PageContext object of this page
Returns:
A String containing the name of the database

onlyRootArgument

protected void onlyRootArgument(String s)
                         throws JspException
Checks if this is not the root tag and throws an exception containing the name of the argument not allowed in non-root tags.

Parameters:
s - The name of the argument
Throws:
JspException

setDb

public void setDb(String db)
           throws JspException
Sets the database argument

Parameters:
db - The database argument
Throws:
JspException