Re: 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.
Laurent Mignon <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <1263974112.2988.1.camel@pcsagblmi> |
On Tue, 2010-01-19 at 15:33 -0500, Stephan Richter wrote:
> On Tuesday 19 January 2010, Michael Howitz wrote:
> > >>> class AddressGroup(group.Group):
> > >>> label = 'Address'
> > >>> fields = field.Fields(zope.schema.TextLine(
> > >>> __name__ = 'owner',
> > >>> title='Owner',
> > >>> readOnly=True)
> > >>> fields += field.Fields(IAddress).select('street')
> > >>>
> > >>> def getContext(self):
> > >>
> > >>
> > >> Should be "getContent", I think.
> >
> Yes, probably a typo. the context is already exposed publically via the
> context attribute, while the content is generally a lookup.
>
Yes it's a typo, sorry...
sagblmi
> Regards,
> Stephan
_______________________________________________
Zope-Dev maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )