Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
In directory james.mmbase.org:/tmp/cvs-serv14430
Modified Files:
Tag: MMBase-1_8
ListRelationsTag.java
Log Message:
fix for MMB-1681 makes a bit more reliable implemetnation of getRelatedNode
necessary
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
See also: http://www.mmbase.org/jira/browse/MMB-1681
Index: ListRelationsTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/ListRelationsTag.java,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -b -r1.20 -r1.20.2.1
--- ListRelationsTag.java 17 Jul 2006 15:38:47 -0000 1.20
+++ ListRelationsTag.java 15 Jul 2008 17:05:31 -0000 1.20.2.1
@@ -21,7 +21,7 @@
* ListRelationsTag, a tag around bridge.Node.getRelations.
*
* @author Michiel Meeuwissen
- * @version $Id: ListRelationsTag.java,v 1.20 2006/07/17 15:38:47 johannes Exp
$
+ * @version $Id: ListRelationsTag.java,v 1.20.2.1 2008/07/15 17:05:31 michiel
Exp $
*/
public class ListRelationsTag extends AbstractNodeListTag {
@@ -78,6 +78,16 @@
}
public Node getRelatedNode() throws JspTagException {
+ Relation rel = getNodeVar().toRelation();
+ if (rel.getIntValue("snumber") == relatedFromNode.getNumber()) {
+ return rel.getDestination();
+ } else {
+ return rel.getSource();
+ }
+ }
+ /* original implementation
+ public Node getRelatedNode() throws JspTagException {
+
if (relatedNodes == null) {
NodesAndTrim result = getNodesAndTrim(getRelatedQuery());
relatedNodes = result.nodeList;
@@ -93,6 +103,7 @@
return relatedNodes.getNode(i);
}
+ */
public int doStartTag() throws JspTagException{
int superresult = doStartTagHelper(); // the super-tag handles the
use of referid...
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs