Re: How to edit dexterity types without needing to know about their behaviors

Asko Soukka <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
Johannes Raggam wrote:
> On Thu, 2014-03-13 at 14:36 +0100, Wichert Akkerman wrote:
>> On 13 Mar 2014, at 14:22, Johannes Raggam <[email protected]> wrote:
>>> On Thu, 2014-03-13 at 14:13 +0100, Wichert Akkerman wrote:
>>>> Why is an adapter necessary for standard attributes like the start time for an event? I don’t understand that part.
>>> look here:
>>> https://github.com/plone/plone.app.event/blob/master/plone/app/event/dx/behaviors.py#L341
>> Why not just use an event base class or mixin instead of a behaviour? That way you get the property normally and don’t force people to play adapter-games.
> i want to avoid that using a base class, because i want to be able to
> just add the IEventBasic behavior to a content object and get full
> eventish behavior then. i love the concept of behaviors for that.

And as said, there is no such thing as "standard attributes".

> i'm thinking of doing it differently - maybe there is some hook in
> z3c.form for which i can register an adapter and apply a fake zone
> before it comes to the comparison? can someone point me to right corner
> in the viscus of z3c.form?

Would a custom z3c.form data converter help? See
z3c.form.interfaces.IDataConverter and z3c.form.converter for the
default implementations.

-Asko

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Plone-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-developers
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.