[z3-five] Editform does not sending ObjectModifiedEvent
Andrey Plotnikov
aplot at sbit.krasnoyarsk.su
Thu Mar 24 02:12:48 MET 2005
Martijn Faassen wrote:
>Are you using the sendsEvents ZCML statements to
>trigger event sending, by the way?
Yes, sure.
>I'm not sure whether I understand what your patch is about..
Well, I try to explain more detailed.
ObjectModifiedEvent is not sended because in method
browser.EditView.update the following condition is always false:
# We should not generate events when an adapter is used.
# That's the adapter's job.
if changed and self.context is self.adapted:
notify(ObjectModifiedEvent(content))
The condition semantic is obvious.
The self.adapted is initialized in EditView._setUpWidgets:
adapted = self.schema(self.context)
But in my case self.context implements the form interface and therefore
self.context and self.adapted must be the same...
But this is never happen: self.adapted is not self.context
And if I just replace the code above to the following:
adapted = self.context
the result is always one: id(adapted) != id(self.context)
I dont undestand that. May be this is acquisition or persistence magic?
P.S. Sorry for my english.
--
Andrey Plotnikov
--
Andrey Plotnikov aplot at sbit.krasnoyarsk.su
More information about the z3-five
mailing list