Plone 4 活动和订阅者
在以下情况下我需要一些帮助:我需要实现一个自定义事件/订阅者,以便能够在对象版本的开始和结束时获取对象的上下文,因为我需要比较两个上下文中对象的某些字段的状态。
有什么方法可以做到吗?是否有可能在所有编辑过程(开始和合并更改)期间有一个实时/执行的处理程序?也许使用线程?
预先感谢您的任何帮助!
I'm needing some help in the following situation: I need to implement a custom event/subscriber in order to be able to get the context of an object in the beginning and in the end of it's edition, because I need to compare the status of some fields of the object in both contexts.
Is there any way to do it? Is it possible to have a handler that is live/executes during all the editing process (it's beginning and the consolidation of the changes)? Maybe using threads?
Thanks in advance for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑覆盖您的编辑表单以获得您想要的内容,而不是尝试在此处使用订阅者 - 这可能看起来像:
然后在 ZCML 或其他内容中注册覆盖。 YMMV,我还没有尝试过,但我认为总体思路应该可行。
Consider overriding your edit form to get what you want instead of trying to use subscribers here -- this might look like:
Then register an override in ZCML or something. YMMV, I have not tried this, but I think the general idea should work.