Tim said:
...
> I guess now I'm starting to think I like the lazy idea of every form being
> $form.*
> instead of $MyWidgetForm, $MyStupidForm, etc.

it is tempting, eh?  i'm just not convinced it's a good idea.  maybe
something like $form.field('username')  would be better than the $form.bean
bit.

> > that said, back in the day, i lobbied for using reflection
> > trickery to pull of $form.* and now i can't recall the
> > arguments involved.  hmm. offhand, that could cause trouble
> > if someone had a method in their ActionForm that collided
> > with one of the standard FormTool methods.
>
> Ok. Understood. We could just change the tool key to $formtool and then
> forms could be either $MyStupidForm or just $form as built-in alias. That
> trickery must be possible in the backend since a few emails back we were
> talking about doing it in the front end view, right? i.e. #set ($myform =
> $form.bean)

-1
aesthetically, i weary of the oh-so-generic 'tool' being in names.  the
current #set( $defaults = $form.bean ) is trivial and optional.  also, it
provides free choice of context keys.  automatically setting $MyForm to
$form would hard-code another context key.

> BTW - Anybody figure out if multiple forms might exist which would screw
> that default alias trick up a bit?

you can put multiple forms on a page, but you can only submit one at a time,
so afaik, struts only supports one form-bean per action mapping.

Nathan Bubna
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to