net.windward.tags
Class QueryTag

net.windward.tags.BaseTag
  |
  +--net.windward.tags.QueryTag

public class QueryTag
extends BaseTag

Set a variable that is a node for later use. This outputs nothing, it just creates a local variable that can be referenced using ${name} later in other tags. For all DataSourceProviders it provides the ability to use the equivilent of the C# use construct.
This tag is passed the attributes select= and the query will select a node that matches that query (normally this will only be used when there is just one node that matches the query). The ${name} construct can then be used to access the data in that node.
To delete a query, specify just the var= attribute. The purpose of this tag is to create a node that can be referenced by other tags. While it can be used in other ways under some of the providers, it's results are not guaranteed for any other use.
This tag represents a <wr:query ...> in the template. The possible usages are:

The full list of attributes is: It is an error to enter <wr:query select="./name" var="name"> ... </wr:query>
This tag follows the jstl example of sql:query and c:set.

Version:
2.0 November 1, 2003

Fields inherited from class net.windward.tags.BaseTag
CHART, COLUMN, DISPLAY_ALWAYS, DISPLAY_NOT_EMPTY, DISPLAY_NOT_NULL, ELSE, END_FOREACH, END_IF, END_LINK, END_MATRIX, ESCAPE, FOREACH, FUNCTION, HTML, IF, IMPORT, LINK, MATRIX, OUT, PROP_COMMENT, PROP_DATASOURCE, PROP_DEFAULT, PROP_DISPLAY, PROP_ENABLED, PROP_INPUT, PROP_PATTERN, PROP_TITLE, PROP_TYPE, PROP_VAR, PROP_WRAP, QUERY, ROW, SET, TAG_DISPLAY_DEFAULT, TAG_DISPLAY_SELECT, TAG_DISPLAY_TAG, TYPE_BITMAP, TYPE_BOTH, TYPE_CURRENCY, TYPE_DATE, TYPE_NUMBER, TYPE_PERCENT, TYPE_TIME, WRAP_BEHIND, WRAP_FRONT, WRAP_INLINE, WRAP_SQUARE
 
Constructor Summary
QueryTag(java.util.Map map, boolean selfContained, boolean ignoreErrors)
          Create an query element using the passed in map values.
 
Method Summary
 net.windward.document.Element dup(boolean sameRefId)
          Makes a duplicate of this object.
 int getXmlType()
          Returns which type of xml element this is.
 java.lang.String toDisplay(int type)
          How this node is displayed on the page when in a field.
 java.lang.String toString()
          Returns this object as a string in the format "query:...".
 java.lang.String toText()
          Converts this node back in to it's string representation in the document
 
Methods inherited from class net.windward.tags.BaseTag
containsAttribute, factory, factory, getAttribute, getAttributes, getBean, getDatasource, getIntAttribute, getLevel, getMode, getNode, getType, setLevel, setNode, toTagText
 

Constructor Detail

QueryTag

public QueryTag(java.util.Map map,
                boolean selfContained,
                boolean ignoreErrors)
         throws TagException
Create an query element using the passed in map values.
Parameters:
map - Must have a var and query entry.
selfContained - Must be true.
ignoreErrors -  
Throws:
TagException - thrown if illegal parameters passed in.
Method Detail

toText

public java.lang.String toText()
                        throws TagException
Converts this node back in to it's string representation in the document
Overrides:
toText in class BaseTag
Returns:
<wr:query ... /> type string.

toDisplay

public java.lang.String toDisplay(int type)
How this node is displayed on the page when in a field.
Overrides:
toDisplay in class BaseTag
Parameters:
type - One of the DISPLAY_* constants
Returns:
title, end of select, or <cmd> type string.

dup

public net.windward.document.Element dup(boolean sameRefId)
Makes a duplicate of this object. A deep clone is done so the new object shares nothing with the original object.
Parameters:
sameRefId -  
Returns:
The new duplicate of this object

getXmlType

public int getXmlType()
Returns which type of xml element this is.
Overrides:
getXmlType in class BaseTag
Returns:
QUERY

toString

public java.lang.String toString()
Returns this object as a string in the format "query:...".
Returns:
A String listing this element.


Copyright © 2002 - 2008 Windward Reports - All Rights Reserved. java reporting software