Update of
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers
In directory james.mmbase.org:/tmp/cvs-serv30632/containers
Modified Files:
ListRelationsContainerTag.java
Log Message:
MMB-1609
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers
See also: http://www.mmbase.org/jira/browse/MMB-1609
Index: ListRelationsContainerTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/ListRelationsContainerTag.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- ListRelationsContainerTag.java 21 Jun 2007 15:50:20 -0000 1.17
+++ ListRelationsContainerTag.java 26 Feb 2008 15:45:02 -0000 1.18
@@ -24,7 +24,7 @@
*
* @author Michiel Meeuwissen
* @since MMBase-1.7
- * @version $Id: ListRelationsContainerTag.java,v 1.17 2007/06/21 15:50:20
nklasens Exp $
+ * @version $Id: ListRelationsContainerTag.java,v 1.18 2008/02/26 15:45:02
michiel Exp $
*/
public class ListRelationsContainerTag extends NodeReferrerTag implements
NodeQueryContainer {
@@ -34,6 +34,7 @@
private Attribute type = Attribute.NULL;
private Attribute role = Attribute.NULL;
private Attribute searchDir = Attribute.NULL;
+ protected String jspVar = null;
public void setCachepolicy(String t) throws JspTagException {
cachePolicy = getAttribute(t);
@@ -51,7 +52,6 @@
public void setRole(String r) throws JspTagException {
role = getAttribute(r);
}
-
public void setSearchdir(String s) throws JspTagException {
searchDir = getAttribute(s);
}
@@ -86,6 +86,9 @@
public int doStartTag() throws JspTagException {
+ if (getReferid() != null) {
+ query = (NodeQuery)
getContextProvider().getContextContainer().getObject(getReferid());
+ } else {
Node relatedFromNode = getNode();
Cloud cloud = relatedFromNode.getCloud();
NodeManager nm = null;
@@ -94,11 +97,18 @@
}
query = Queries.createRelationNodesQuery(relatedFromNode, nm,
(String) role.getValue(this), (String) searchDir.getValue(this));
relatedQuery = Queries.createRelatedNodesQuery(relatedFromNode, nm,
(String) role.getValue(this), (String) searchDir.getValue(this));
+ }
if (cachePolicy != Attribute.NULL) {
query.setCachePolicy(CachePolicy.getPolicy(cachePolicy.getValue(this)));
relatedQuery.setCachePolicy(CachePolicy.getPolicy(cachePolicy.getValue(this)));
}
+ if (getId() != null) { // write to context.
+ getContextProvider().getContextContainer().register(getId(),
query);
+ }
+ if (jspVar != null) {
+ pageContext.setAttribute(jspVar, query);
+ }
return EVAL_BODY;
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs