org.dbforms.taglib
Class QueryDataTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.dbforms.taglib.AbstractScriptHandlerTag
              extended by org.dbforms.taglib.AbstractDbBaseHandlerTag
                  extended by org.dbforms.taglib.AbstractEmbeddedDataTag
                      extended by org.dbforms.taglib.QueryDataTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally, IStaticDataList

public class QueryDataTag
extends AbstractEmbeddedDataTag
implements javax.servlet.jsp.tagext.TryCatchFinally

external data to be nested into radio, checkbox or select - tag! (useful only in conjunction with radio, checkbox or select - tag)

this tag provides data to radio, checkbox or select - tags. it may be used for cross-references to other tables.

this tag provides similar functionlaity to "TabData", but as it allows to formulate free querys including all SQL statements your RDBMS supports you have much more flexibility using this tag.

query building convention: first column is the "key" column for the radio/check/select elements, all other colums are just "data" columns visible to the user example: SELECT DISTINCT customer.id, customer.name, customer.adress, debitors.debit FROM customer INNER JOIN id ON (SELECT id FROM debitors WHERE debit>100000) ORDER BY debit DESC

- "id" will be threaten as key-value in select box, "name and address will be shown in select box

Author:
Joachim Peer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
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
QueryDataTag()
           
 
Method Summary
 void doFinally()
          DOCUMENT ME!
protected  List fetchData(Connection con)
          returns Hashtable with data.
 String getQuery()
          DOCUMENT ME!
 void setQuery(String query)
          DOCUMENT ME!
 
Methods inherited from class org.dbforms.taglib.AbstractEmbeddedDataTag
addElement, doStartTag, formatEmbeddedResultRows, getDbConnectionName, getDisableCache, getEscaper, getFormatClass, getName, setDbConnectionName, setDisableCache, setFormat, setFormatClass, setName, useCache
 
Methods inherited from class org.dbforms.taglib.AbstractDbBaseHandlerTag
customFormat, escapeHTML, getCustomFormatter, getDefaultValue, getEscaperClass, getField, getFieldObject, getFieldValue, getFormattedFieldValue, getFormatter, getFormFieldDefaultValue, getFormFieldName, getFormFieldValue, getLocale, getMaxlength, getParentForm, getPattern, getReadOnlyStyleClass, getStyleClass, hasReadOnlySet, renderOldValueHtmlInputField, renderPatternHtmlInputField, setCustomFormatter, setDefaultValue, setEscaperClass, setField, setFieldName, setMaxlength, setNullFieldValue, setParent, setPattern, setReadOnly, setReadOnlyStyleClass, typicalDefaultValue, writeOutSpecialValues
 
Methods inherited from class org.dbforms.taglib.AbstractScriptHandlerTag
doCatch, getAccessKey, getConfig, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getTabIndex, getTitle, prepareEventHandlers, prepareStyles, setAccessKey, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyleClass, setTabIndex, setTitle
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.TryCatchFinally
doCatch
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext
 

Constructor Detail

QueryDataTag

public QueryDataTag()
Method Detail

setQuery

public void setQuery(String query)
DOCUMENT ME!

Parameters:
query - DOCUMENT ME!

getQuery

public String getQuery()
DOCUMENT ME!

Returns:
DOCUMENT ME!

doFinally

public void doFinally()
DOCUMENT ME!

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally
Overrides:
doFinally in class AbstractEmbeddedDataTag
See Also:
TryCatchFinally.doFinally()

fetchData

protected List fetchData(Connection con)
                  throws SQLException
returns Hashtable with data. Its keys represent the "value"-fields for the DataContainer-Tag, its values represent the visible fields for the Multitags. (DataContainer are: select, radio, checkbox and a special flavour of Label).

Specified by:
fetchData in class AbstractEmbeddedDataTag
Parameters:
con - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
SQLException


Copyright © 2002-2006 DbForms. All Rights Reserved.