This is maybe a bit off subject, but I dealt with this form/content/fields matters in a package : <br><a href="http://tracker.trollfot.org/browser/projects/dolmen/dolmen.packages/dolmen.content/dolmen/content">http://tracker.trollfot.org/browser/projects/dolmen/dolmen.packages/dolmen.content/dolmen/content</a><br>
If you want to have a look, maybe we can share opinions and fiddle something more interesting for both of us :)<br><br><div class="gmail_quote">2009/6/23 Jasper Spaans <span dir="ltr">&lt;<a href="mailto:j@jasper.es">j@jasper.es</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
The following code should speak for itself; is it supposed to work like<br>
this? (the reason for the constructor is that form_fields takes its value<br>
from IAction, which is not what I want as I&#39;m adding/editting objects of<br>
type context.__class__, which might implement interfaces derived from<br>
IAction.)<br>
<br>
trollfot on #grok mentioned that a use case for the current behaviour is<br>
when you want to prevent editing all of the attributes of an object.<br>
<br>
What&#39;s your opinion?<br>
<br>
class EditAction(grok.EditForm):<br>
    <a href="http://grok.name" target="_blank">grok.name</a>(&#39;edit&#39;)<br>
    grok.context(IAction)<br>
    grok.template(&#39;addaction&#39;)<br>
<br>
    def __init__(self, context, request):<br>
        super(EditAction, self).__init__(context, request)<br>
        self.form_fields = grok.AutoFields(context.__class__)<br>
<br>
Cheers,<br>
--<br>
Jasper Spaans<br>
<br>
Fox-IT Experts in IT Security!<br>
I <a href="http://www.fox-it.com" target="_blank">www.fox-it.com</a><br>
_______________________________________________<br>
Grok-dev mailing list<br>
<a href="mailto:Grok-dev@zope.org">Grok-dev@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/grok-dev" target="_blank">http://mail.zope.org/mailman/listinfo/grok-dev</a><br>
</blockquote></div><br>