Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
In directory james.mmbase.org:/tmp/cvs-serv20612
Modified Files:
Tag: MMBase-1_8
FieldListTag.java
Log Message:
made mm:fieldlist also recognize the implicit node
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
Index: FieldListTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/FieldListTag.java,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -b -r1.54 -r1.54.2.1
--- FieldListTag.java 17 Jul 2006 15:38:47 -0000 1.54
+++ FieldListTag.java 3 Apr 2008 16:26:29 -0000 1.54.2.1
@@ -23,7 +23,7 @@
* This class makes a tag which can list the fields of a NodeManager.
*
* @author Michiel Meeuwissen
- * @version $Id: FieldListTag.java,v 1.54 2006/07/17 15:38:47 johannes Exp $
+ * @version $Id: FieldListTag.java,v 1.54.2.1 2008/04/03 16:26:29 michiel Exp $
*/
public class FieldListTag extends FieldReferrerTag implements ListProvider,
FieldProvider, QueryContainerReferrer {
@@ -121,6 +121,10 @@
}
public Node getNodeVar() throws JspTagException {
+
+ Node node = parentNodeId == Attribute.NULL ? getNodeFromPageContext()
: null;
+ if (node != null) return node;
+
/*
if (nodeManagerString != null) {
return null;
@@ -167,9 +171,13 @@
* @since MMBase-1.8.1
*/
protected NodeManager getNodeManagerFromQuery(String id, boolean
exception) throws JspTagException {
- NodeQueryContainer qc = (NodeQueryContainer)
findParentTag(NodeQueryContainer.class, container.getString(this), exception);
+ NodeQueryContainer qc = (NodeQueryContainer)
findParentTag(NodeQueryContainer.class, id, exception);
+ if (qc != null) {
NodeQuery query = qc.getNodeQuery();
return query.getNodeManager();
+ } else {
+ return null;
+ }
}
/**
@@ -243,6 +251,7 @@
} else {
returnList.add(addObject);
}
+
}
if (retain != Attribute.NULL) {
Object retainObject = getObject(retain.getString(this));
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs