[Product-Developers] Re: Post-create update of a reference field
lists at zopyx.com
Thu Jun 11 09:57:57 UTC 2009
On 11.06.09 11:53, Yuri wrote:
> Andreas Jung ha scritto:
>> On 11.06.09 11:24, Maurits van Rees wrote:
>>> Andreas Jung, on 2009-06-11:
>>>> Hi there,
>>>> following use case: an AT-Event derived content-type contains provides
>>>> a "create sub-event" link within its default view. Clicking on the
>>>> will create a new event and add the new event to a referencefield
>>>> the original event (standard master-slave relationship). This works
>>>> with invokeFactory() and updating the related fields within a
>>>> browser view.
>>>> However I want to use portal_factory in order to avoid orphan
>>>> event. Any
>>>> how to update the referencefield of the master event after the
>>>> of the
>>>> slave event through portal_factory?
>>> Register a zope 3 event handler for the sub event type and
>>> In that handler check if the parent of the object is an instance of
>>> your AT-Event derived content-type and set the reference field.
>> Object subscriber won't work because the events aren't nested and the
>> parent container
>> does not know about the original object :-)
> I would use plone.app.relations and pass the relation to the sub
> object, instead of using referencefields.
> Then you can map it in the dublin core, rdf, and you web become
> semantic too :D
Totally unrelated to my question.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 316 bytes
Desc: not available
More information about the Product-Developers