Re: set() and get() of IField ignored in Dexterity?
"David Glick (Plone)" <david.glick-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/30/14, 9:39 AM, Andreas Jung wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I implemented an XML field for Dexterity > > https://bitbucket.org/onkopedia/zopyx.existdb/src/438c6daa6bf3f5ac0c0a08b602e1f9927ead058a/zopyx/existdb/dx/fields.py?at=dexterity > > which is working nicely with plone.schemaeditor. > > However: the set() and get() methods are completely > ignored. Is there something in Dexterity by-passing > these methods? > > - -aj > The default z3c.form data manager is z3c.form.datamanager.AttributeField which just does setattr and getattr on the (possibly adapted) context. If you want the field's get/set to be used, you'll either have to write a custom data manager for your field, or use a custom content item class that uses property descriptors. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk