[Zope3-dev] RFC: preCreation view, postCreation view use cases
Steve Alexander
steve@cat-box.net
Fri, 29 Mar 2002 20:03:50 +0000
Gary Poster wrote:
>
>
> * we ought to be able to specify pre-creation views (plural!) of an object,
> that will let us provide TTW the values needed to instantiate an object
> (including a file upload). This seems particularly important to me to be
> able to use non-Zope specific classes.
I often want something like this.
I usually implement it an object of the usual class for that content
component, initialized with the correct values, and wrapped
(ContextWrapper) in the context of its container-to-be, even though it
has not yet been added to its container-to-be.
An alternative way of doing this is to extend containers to have to sets
of contents: one is the usual set of persistent contents. Another is a
set of subjunctive contents, which either become real persistent
contents when properly added, or get removed if the adding process is
aborted (explicitly or by timing out).
> * we ought to be able to specify a default post-creation view of an object,
> to which the creation process will automatically direct the user after object
> creation.
Do we need this in addition to a normal default view?
There's already a directive to state that a particular view is the
default view for a content component.
Then again, perhaps you're taking about a specific post-creation view
that may be different than the normal default view.
--
Steve Alexander