AW: [Zope3-dev] Re: edit view of a object unknown?

Roger ineichen dev at projekt01.ch
Sat Mar 6 12:59:05 EST 2004


> Garrett Smith wrote:
> > Roger ineichen wrote:
> > Hello together,
> > 
> > Is there a way to get the edit view of a object?
> > 
> > I can't find the right method for calling a
> > edit view. The views don't know for what they are
> > and I don't know how somebody is registering the
> > name of a edit view. Except the defaultView.
> > Most the time they called edit.html, but not at all.
> > 
> > Or do I have to give back the object and select the edit
> > view in the ZMI?
> 
> There's no general facility for getting an edit view on any object -- 
> you'll need to declare an editform using ZCML (at least that's the 
> easiest way). Here's a snippet from file's configure.zcml 
> (zope/app/file/browser/configure.zcml):
> 
>    <browser:editform
>        name="edit.html"
>        schema="zope.app.file.interfaces.IFile"
>        label="Change a file"
>        usage="objectview"
>        permission="zope.ManageContent"
>        class=".file.FileTextEdit"
>        />

Yes I know that. I have declared a edit.html

> As the snippet illustrates, the configuration of an edit form 
> is quite 
> explicit -- "edit.html" might be "general.html" for another 
> object, etc.

Does this mean that we have to declare edit views "edit.html"?

What I missing is:
If I write python classes and I get a object from a folder
with self.__getitem__('aName'). Then I whould like to give 
back the object with a edit view. But we don't have a 
standard way for to do that in Zope3. Except hoppe that
anybody is declare the view as "edit.html"

What do you think about this? Is this right?

The reason is for to get on this view, we have additional 
configuration information in the view. (CustomWidgetFatory)
This are configuration information how future objects
are created. 

My main question should be:
Can we take this important information how a object is 
created out of the edit view (CustomWidgetFatory)
to somewhere else like ZCML? 

Otherwise we can't create objects during a python process
in Zope3.
 

Roger

btw
Thanks Garrett, the widget framework is really a great work.

>   -- Garrett
> 
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org http://mail.zope.org/mailman/listinfo/zope3-dev
> 




More information about the Zope3-dev mailing list