At end.

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> Sent: Monday, November 11, 2002 3:02 PM
> 
> On Mon, 11 Nov 2002, Karr, David wrote:
> 
> > Date: Mon, 11 Nov 2002 12:22:44 -0800
> > From: "Karr, David" <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: Struts Developers List <[EMAIL PROTECTED]>
> > Subject: RE: Unclear semantics on form use for "wizards"
> >
> > This may seem far out, but what if the "reset" 
> functionality could be
> > entirely specified in the "form-bean" element?
> 
> You could make a case that it already is :-).
> 
> If you use DynaActionForm or DynaActionValidatorForm, the 
> default reset()
> method has well-defined semantics already (including the fact 
> that it sets
> boolean properties to false).  In addition, it supports 
> setting the value
> to which most properties are set with the "initial" attribute on
> <form-property>.  The only cases you typically need to 
> override reset() in
> this case are for mapped properties -- the initial expression 
> supports a
> subset of Java's array initializer syntax for array based properties:
> 
>   <form-property name="statuses" type="java.lang.String[]"
>    initial='{ "foo", "bar" }'/>
> 
> The missing link for a multi-page form is some way to tie 
> which page got
> submitted to the set of properties that live on that page 
> (and therefore
> need to be reset.

Clearly, the page number is the crux of the problem.  That's all I was
trying to address in that fantasy syntax I was suggesting.

What if each "form-property" element had an optional "page" attribute,
holding an integer value (or range)?  At "reset" time, the only
attributes that would be reset would be the ones without a "page"
attribute, and the ones with a "page" attribute value that matches the
current "page" value.  This might call for an attribute on the
"form-bean" named "pageAttribute" or "pageProperty".

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to