info.magnolia.cms.taglibs
Class QueryTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by info.magnolia.cms.taglibs.QueryTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class QueryTag
extends javax.servlet.jsp.tagext.TagSupport

Executes a query on a Magnolia repository.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Fabrizio Giustina
See Also:
Serialized Form

Field Summary
 
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
QueryTag()
           
 
Method Summary
 int doEndTag()
           
 void release()
           
 void setNodeType(String nodeType)
          Nodetype for nodes to return.
 void setQuery(String query)
          The query.
 void setRepository(String repository)
          The repository to execute this query on.
 void setType(String type)
          Query type: "sql" or "xpath".
 void setVar(String var)
          The result for this query (Collection of content objects) will be added to the pageContext with this name.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryTag

public QueryTag()
Method Detail

setQuery

public void setQuery(String query)
The query.


setType

public void setType(String type)
Query type: "sql" or "xpath". Defaults to xpath.


setVar

public void setVar(String var)
The result for this query (Collection of content objects) will be added to the pageContext with this name.


setRepository

public void setRepository(String repository)
The repository to execute this query on. Defaults to "website".


setNodeType

public void setNodeType(String nodeType)
Nodetype for nodes to return. Defaults to "mgnl:content".


doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.