[Zope3-dev] Re: AW: Re: edit view of a object unknown?
Garrett Smith
garrett at mojave-corp.com
Sat Mar 6 14:19:07 EST 2004
Roger ineichen wrote:
> Does this mean that we have to declare edit views "edit.html"?
You can't rely on a) an edit view existing for an object, much less b)
that view having the name "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"
I prefer self['aName'] over self.__getitem__('aName'), but that's
another issue :-)
> 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?
I think this falls into the realm of widgets, which are views to objects
that are intended for use within pages (or forms). I don't have any
first hand experience with the object widget, but you might experiment
with it -- take a look at the tests for it, as they're the only real
clue into its use:
zope/app/browser/form/tests/test_objectwidget.py
I'm inclined to write an ftest for this creature, which would give me an
idea of how (well) it works. Rumor has it, though, that it can be used
for the sort of thing you're doing.
> btw
> Thanks Garrett, the widget framework is really a great work.
I've just done some minor cleanup :-) The framework is the work of
others, leveraging lots of lessons learned from other excellent
schema/widget/forms implementations.
-- Garrett
More information about the Zope3-dev
mailing list