Update of
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers
In directory james.mmbase.org:/tmp/cvs-serv32723/containers
Modified Files:
RelatedNodesContainerTag.java ListNodesContainerTag.java
Log Message:
MMB-1610
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-1610
Index: RelatedNodesContainerTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/RelatedNodesContainerTag.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- RelatedNodesContainerTag.java 21 Jun 2007 15:50:20 -0000 1.16
+++ RelatedNodesContainerTag.java 26 Feb 2008 17:06:44 -0000 1.17
@@ -26,7 +26,7 @@
*
* @author Michiel Meeuwissen
* @since MMBase-1.7
- * @version $Id: RelatedNodesContainerTag.java,v 1.16 2007/06/21 15:50:20
nklasens Exp $
+ * @version $Id: RelatedNodesContainerTag.java,v 1.17 2008/02/26 17:06:44
michiel Exp $
*/
public class RelatedNodesContainerTag extends ListNodesContainerTag {
@@ -51,7 +51,11 @@
public int doStartTag() throws JspTagException {
- if (getReferid() != null) {
+ String cloneId = clone.getString(this);
+ if (! "".equals(cloneId)) {
+ query = (NodeQuery)
getContextProvider().getContextContainer().getObject(cloneId);
+ query = (NodeQuery) query.clone();
+ } else if (getReferid() != null) {
query = (NodeQuery)
getContextProvider().getContextContainer().getObject(getReferid());
if (nodeManager != Attribute.NULL || role != Attribute.NULL ||
searchDirs != Attribute.NULL || path != Attribute.NULL || element !=
Attribute.NULL) {
throw new JspTagException("Cannot use 'nodemanager', 'role',
'searchdirs', 'path' or 'element' attributes together with 'referid'");
Index: ListNodesContainerTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/ListNodesContainerTag.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- ListNodesContainerTag.java 10 Feb 2007 16:49:27 -0000 1.22
+++ ListNodesContainerTag.java 26 Feb 2008 17:06:44 -0000 1.23
@@ -23,7 +23,7 @@
*
* @author Michiel Meeuwissen
* @since MMBase-1.7
- * @version $Id: ListNodesContainerTag.java,v 1.22 2007/02/10 16:49:27
nklasens Exp $
+ * @version $Id: ListNodesContainerTag.java,v 1.23 2008/02/26 17:06:44 michiel
Exp $
*/
public class ListNodesContainerTag extends NodeReferrerTag implements
NodeQueryContainer {
// nodereferrer because RelatedNodesContainer extension
@@ -35,6 +35,8 @@
protected Attribute nodeManager = Attribute.NULL;
protected Attribute element = Attribute.NULL;
protected Attribute nodes = Attribute.NULL;
+ protected Attribute clone = Attribute.NULL;
+ protected Attribute markused = Attribute.NULL;
protected String jspVar = null;
/**
@@ -66,6 +68,20 @@
nodes = getAttribute(n);
}
+
+ /**
+ * @since MMBase-1.8.6
+ */
+ public void setClone(String c) throws JspTagException {
+ clone = getAttribute(c);
+ }
+ /**
+ * @since MMBase-1.8.6
+ */
+ public void setMarkused(String mu) throws JspTagException {
+ markused = getAttribute(mu);
+ }
+
/**
* @since MMBase-1.8.1
*/
@@ -90,7 +106,11 @@
}
public int doStartTag() throws JspTagException {
- if (getReferid() != null) {
+ String cloneId = clone.getString(this);
+ if (! "".equals(cloneId)) {
+ query = (NodeQuery)
getContextProvider().getContextContainer().getObject(cloneId);
+ query = (NodeQuery) query.clone();
+ } else if (getReferid() != null) {
query = (NodeQuery)
getContextProvider().getContextContainer().getObject(getReferid());
if (nodeManager != Attribute.NULL || path != Attribute.NULL ||
element != Attribute.NULL) {
throw new JspTagException("Cannot use 'nodemanager', 'path' or
'element' attributes together with 'referid'");
@@ -150,6 +170,9 @@
return SKIP_BODY;
}
public int doEndTag() throws JspTagException {
+ if (markused.getBoolean(this, false)) {
+ query.markUsed();
+ }
query = null;
return super.doEndTag();
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs