diff --git a/common.py b/common.py
index 48dd919..f6b19cf 100644
--- a/common.py
+++ b/common.py
@@ -412,6 +412,16 @@ class ChildRelationSet(RelationSet):
for c in self.context.getChildren([self.predicate]):
yield adapted(c, langInfo=self.langInfo)
+ def getRelations(self, check=None, noSecurityCheck=None):
+ if self.adapted.__is_dummy__:
+ return
+ if noSecurityCheck is None:
+ noSecurityCheck = self.noSecurityCheck
+ for r in self.context.getChildRelations([self.predicate],
+ noSecurityCheck=noSecurityCheck):
+ if check is None or check(r):
+ yield r
+
# property descriptors
diff --git a/schema/field.py b/schema/field.py
index 910205f..98dd32b 100644
--- a/schema/field.py
+++ b/schema/field.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2008 Helmut Merz helmutm@cy55.de
+# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
"""
Field and field instance classes for grids.
-
-$Id$
"""
from zope import component
@@ -79,11 +77,13 @@ class RelationSetFieldInstance(ListFieldInstance, BaseRelationFieldInstance):
nodeView = self.clientInstance.view.nodeView
return [dict(url=nodeView.getUrlForTarget(baseObject(v)),
label=v.title) for v in value]
- #return ' | '.join([v.title for v in value])
def unmarshall(self, value):
return [util.getObjectForUid(v) for v in value]
+ def getRenderer(self, name):
+ return relation_macros.macros[name]
+
class RelationFieldInstance(FieldInstance, BaseRelationFieldInstance):
diff --git a/schema/relation_macros.pt b/schema/relation_macros.pt
index f63d31a..071a45a 100755
--- a/schema/relation_macros.pt
+++ b/schema/relation_macros.pt
@@ -3,9 +3,18 @@
-
+
+
+
+ ·
+
+
+
+
+
@@ -31,10 +40,10 @@
name string:${name}_search;
id string:${name}_search;
onChange string:addRelation('$name')" />
-
+
-
-
+