com.mkdoc.tag
Class QueryResultTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.mkdoc.tag.AbstractXhtmlTag
              |
              +--com.mkdoc.tag.AbstractApplicationProfileTag
                    |
                    +--com.mkdoc.tag.AbstractQueryTag
                          |
                          +--com.mkdoc.tag.QueryResultTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class QueryResultTag
extends AbstractQueryTag

Render query results to a JSP page.

Version:
0.9 2005-11-22
Author:
Philip Shaw
See Also:
Serialized Form

Field Summary
protected  int mode
          The tag output mode.
 
Fields inherited from class com.mkdoc.tag.AbstractQueryTag
manager
 
Fields inherited from class com.mkdoc.tag.AbstractApplicationProfileTag
profile
 
Fields inherited from class com.mkdoc.tag.AbstractXhtmlTag
END_ATTR_TAG, OPEN_TD, OPEN_TH, OPEN_TR, SHUT_LABEL, SHUT_TD, SHUT_TH, SHUT_TR
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent
 
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
QueryResultTag()
           
 
Method Summary
 int doStartTag()
          Parse a query and output the results.
protected  boolean getExtended()
          Get extended bNode query status.
 int getMode()
          Get the output mode for the tag.
protected  void init()
          Get the configuration parameters for the tag.
 void setExtended(boolean extended)
          Set whether extended bNode queries are supported.
 void setMode(int mode)
          Set the output mode for the tag.
 
Methods inherited from class com.mkdoc.tag.AbstractQueryTag
configureStoreManager, getQueryUrl, setQueryUrl
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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, toString, wait, wait, wait
 

Field Detail

mode

protected int mode
The tag output mode.

Since:
Version 0.1 2005-07-19
Constructor Detail

QueryResultTag

public QueryResultTag()
Method Detail

init

protected final void init()
                   throws javax.servlet.jsp.JspException
Get the configuration parameters for the tag.

Throws:
javax.servlet.jsp.JspException - If there is an exception creating a store query manager to handle queries.
Since:
Version 0.1 2005-07-19

doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
Parse a query and output the results.

The appropriate content type should be set in the JSP template.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
The skip body message.
Throws:
javax.servlet.jsp.JspException - If there is a problem issuing a server error response.
Since:
Version 0.1 2005-07-19

getMode

public final int getMode()
Get the output mode for the tag.

Returns:
The output mode, which is QueryResultTag.FULL or QueryResultTag.INSERT
Since:
Version 0.2 2005-07-22

setMode

public final void setMode(int mode)
Set the output mode for the tag.

Parameters:
mode - The output mode for the tag, which should be either ResultRenderer.FULL or ResultRenderer.INSERT
Since:
Version 0.2 2005-07-22

setExtended

public final void setExtended(boolean extended)
Set whether extended bNode queries are supported.

Parameters:
extended - Whether bNode queries are supported.
Since:
Version 0.5 2005-09-13

getExtended

protected final boolean getExtended()
Get extended bNode query status.

Returns:
Whether bNode queries are supported.
Since:
Version 0.7 2005-10-19