Re: set() and get() of IField ignored in Dexterity?

Johannes Raggam <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
On Mon, 2014-12-01 at 13:42 +0100, Andreas Jung wrote:
> David Glick (Plone) wrote:
> > 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.
> 
> This is perhaps an option when you define your content-types in Python
> code but completely unusable for TTW content-types.

The data manager would adapt a generic context and your specific field.
So, if you create this data-manager and create a TTW content type using
this field, it should use your data manager.


-- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
plone framework  team  member
mail: office-//[email protected]
web:  http://programmatic.pro
      http://bluedynamics.com

------------------------------------------------------------------------------
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

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
signature.asc (application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEABECAAYFAlR9g14ACgkQW4mNMQxDgAcMYwCfQFpBMz7I/tA89PXmQqLZi5gp
TJgAoJP3sAK6m3F9OVgsO62qRMpFpkly
=vaYe
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.