[Zope3-dev] addforms - ordering issue
Gary Poster
gary@zope.com
Sat, 28 Jun 2003 20:07:02 -0400
Garrett Smith wrote:
> Field values are being assigned to a recently created component *after*
> an item is added via its view's add method.
>
> I realize that the addform takes a 'set_before_add' attribute, but it
> seems to me that this should be the default behavior. I.e. when I handle
> an 'add' in my addform view, I would expect that item's to be set, at
> least by default. If, for some reason, I want some fields configured
> after the add, I can specify 'set_after_add' in the addform declaration.
>
> Maybe I'm, missing something, but can't we remove the 'set_before_add'
> attribute? The default behavior would be to set fields *before* the add
> unless 'set_after_add' said otherwise.
I don't think I'd want to remove it--in the name of allowing people to
be super-explicit--but Amen (i.e., +1 :-) to making set_before_add the
default. That I have to specify all of my fields in set_before_add in
all of my addform zcml is an annoying dead chicken in my book.
Didn't Steve have something against this though? I think I brought up
something vaguely similar a few weeks ago...but I cleaned out all my old
Zope 3 emails...
But again, from my perspective, a hearty +1.
Gary