org.makumba.list.tags
Class ResultListTag

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
                      extended by org.makumba.list.tags.QueryTag
                          extended by org.makumba.list.tags.ResultListTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class ResultListTag
extends QueryTag

This class is a specially tailored mak:list to work on the results from a search form. It provides short-cuts to set the from, variableFrom and where parameters from the request attributes set by the search form.

Version:
$Id: ResultListTag.java,v 1.1 Oct 24, 2007 1:04:02 PM mayer Exp $
Author:
Rudolf Mayer
See Also:
SearchTag, QueryTag, 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.list.tags.QueryTag
authorize, countVar, editable, editPage, execution, lastFinishedListKey, limit, logicClass, maxCountVar, offset, one, queryExecuted, queryProps, runningListKeyStack, separator, standardCountVar, standardLastCountVar, standardMaxCountVar, standardMaxResultsKey, standardMaxResultsVar, standardNextCountVar, upperCount, upperMaxCount, upperMaxResults, zero
 
Fields inherited from class org.makumba.list.tags.GenericListTag
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
ResultListTag()
           
 
Method Summary
 int doAnalyzedEndTag(PageCache pageCache)
          Cleans up variables, especially for the rootList.
 int doAnalyzedStartTag(PageCache pageCache)
          Decides if there will be any tag iteration.
 void doStartAnalyze(PageCache pageCache)
          Starts the analysis of the tag, without knowing what tags follow it in the page.
protected  void registerPossibleAttributeValues()
          Override this in order to register possible attribute values using AnalysableTag.registerAttributeValues(String, String...).
 void setMode(String mode)
           
 void setResultsFrom(String s)
           
 void setStaticWhere(String s)
           
 void setTagKey(PageCache pageCache)
          Computes and set the tagKey.
 
Methods inherited from class org.makumba.list.tags.QueryTag
allowsIdenticalKey, cacheQuery, canHaveBody, count, doAfterBody, doAnalyzedCleanup, doEndAnalyze, getCurrentIterationNumber, getEditable, getEditPage, getLimitInt, getLogicClass, getNumberOfIterations, getOffsetInt, getParentList, getParentListKey, getQuery, getRunningQueryTagStack, lastCount, lastCountById, maxCount, maxResults, nextCount, nextCountById, onlyOuterListArgument, setAuthorize, setCountVar, setDefaultLimit, setEditable, setEditPage, setFrom, setGroupBy, setLimit, setLogicClass, setMaxCountVar, setNumberOfIterations, setOffset, setOrderBy, setSeparator, setVariableFrom, setWhere
 
Methods inherited from class org.makumba.list.tags.GenericListTag
addToParentListKey, doEndTag, getDatabaseName, getDataSourceName, onlyRootArgument, setDb
 
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, checkAttributeValues, 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
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.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

ResultListTag

public ResultListTag()
Method Detail

setResultsFrom

public void setResultsFrom(String s)

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

setMode

public void setMode(String mode)

setStaticWhere

public void setStaticWhere(String s)

doAnalyzedStartTag

public int doAnalyzedStartTag(PageCache pageCache)
                       throws LogicException,
                              JspException
Description copied from class: QueryTag
Decides if there will be any tag iteration. The QueryExecution is found (and made if needed), and we check if there are any results in the iterationGroup. Calls QueryTag.initiateQueryExecution(PageContext, boolean) and QueryTag.doTagExecution(PageCache, PageContext)

Overrides:
doAnalyzedStartTag in class QueryTag
Parameters:
pageCache - The page cache for the current page
Returns:
The tag return state as defined in the Tag interface
Throws:
LogicException
JspException
See Also:
QueryExecution

doStartAnalyze

public void doStartAnalyze(PageCache pageCache)
Description copied from class: QueryTag
Starts the analysis of the tag, without knowing what tags follow it in the page. Defines a query, sets the types of variables to "int".

Overrides:
doStartAnalyze in class QueryTag
Parameters:
pageCache - The page cache for the current page

setTagKey

public void setTagKey(PageCache pageCache)
Description copied from class: QueryTag
Computes and set the tagKey. At analysis time, the listQuery is associated with the tagKey, and retrieved at runtime. At runtime, the QueryExecution is discovered by the tag based on the tagKey.

Overrides:
setTagKey in class QueryTag
Parameters:
pageCache - The page cache for the current page
See Also:
AnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache), AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)

doAnalyzedEndTag

public int doAnalyzedEndTag(PageCache pageCache)
                     throws JspException
Description copied from class: QueryTag
Cleans up variables, especially for the rootList.

Overrides:
doAnalyzedEndTag in class QueryTag
Parameters:
pageCache - The page cache for the current page
Returns:
The tag return state as defined in the Tag interface in order to continue evaluating the page.
Throws:
JspException
See Also:
AnalysableTag.doEndTag()