org.makumba.list.tags
Class GenericListTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableElement
org.makumba.analyser.AnalysableTag
org.makumba.commons.tags.GenericMakumbaTag
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
- exception handling
- storage of formatting parameters
- database name setting/getting
- cleanup
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
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 |
fdp
protected FormDataProvider fdp
GenericListTag
public GenericListTag()
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