[Checkins] SVN: z3c.form/trunk/ ``GroupForm`` and ``Group`` now use ``getContent`` method when instantiating group classes instead of directly accessing ``self.context``, as this is the usual way to access the context of the form and allows nested groups to have a different context than the main form.
Michael Howitz
mh at gocept.com
Tue Jan 12 12:33:52 EST 2010
Log message for revision 108077:
``GroupForm`` and ``Group`` now use ``getContent`` method when instantiating group classes instead of directly accessing ``self.context``, as this is the usual way to access the context of the form and allows nested groups to have a different context than the main form.
Changed:
U z3c.form/trunk/CHANGES.txt
U z3c.form/trunk/src/z3c/form/group.py
-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt 2010-01-12 16:55:11 UTC (rev 108076)
+++ z3c.form/trunk/CHANGES.txt 2010-01-12 17:33:51 UTC (rev 108077)
@@ -5,7 +5,9 @@
2.3.1 (unreleased)
------------------
-- Nothing changed yet.
+- ``GroupForm`` and ``Group`` now use ``getContent`` method when
+ instantiating group classes instead of directly accessing
+ ``self.context``.
2.3.0 (2009-12-28)
Modified: z3c.form/trunk/src/z3c/form/group.py
===================================================================
--- z3c.form/trunk/src/z3c/form/group.py 2010-01-12 16:55:11 UTC (rev 108076)
+++ z3c.form/trunk/src/z3c/form/group.py 2010-01-12 17:33:51 UTC (rev 108077)
@@ -52,7 +52,7 @@
if interfaces.IGroup.providedBy(groupClass):
group = groupClass
else:
- group = groupClass(self.context, self.request, self)
+ group = groupClass(self.getContent(), self.request, self)
group.update()
groups.append(group)
self.groups = tuple(groups)
@@ -130,7 +130,7 @@
if interfaces.IGroup.providedBy(groupClass):
group = groupClass
else:
- group = groupClass(self.context, self.request, self)
+ group = groupClass(self.getContent(), self.request, self)
group.update()
groups.append(group)
self.groups = tuple(groups)
More information about the checkins
mailing list