>In Struts 1.1, we need to provide finer-grained control over this as
>part of enhanced validation processing (i.e. things like per-property
>default values and such).

We're currently looking at ways of implementing user preferences, so that
when ever we construct a given bean (for a specific form probably), the
user's default values are set. Has any coding started on this / design been
done as yet?

My current thoughts are:

a) Some sort of bean factory that could apply any suitable defaults, based
on info in the session / our own classes -- maybe via some sort of
framework hook.

b) Same as (a) but maybe using a custom tag instead of <jsp:useBean />

c) Always enter an app / screen via an action, so that it can initialise
the required beans, so that useBean never constructs the beans.

Ideas?

Ken.





[EMAIL PROTECTED] on 07/02/2001 17:51:08

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Ken X Horn)
Subject:  Re: specifying default values for forms



"Deadman, Hal" wrote:

>  Is there a way to specify default values other than zero for when an
> ActionForm setter method takes a number argument and the conversion of
> the string input fails? I seem to recall discussion of this feature
> but I can't dig up the thread. Thanks, Hal

The ConvertUtils class was recently enhanced to include mechanisms to
set the default value returned in such cases.  These settings are global
to your webapp, so they will affect conversion failures on all
properties of a given type.  This is in the current nightly builds.

In Struts 1.1, we need to provide finer-grained control over this as
part of enhanced validation processing (i.e. things like per-property
default values and such).

Craig

"Deadman, Hal" wrote:
 Is there a way to specify default values other than zero for when an ActionForm setter method takes a number argument and the conversion of the string input fails? I seem to recall discussion of this feature but I can't dig up the thread. Thanks, Hal


The ConvertUtils class was recently enhanced to include mechanisms to set the default value returned in such cases.  These settings are global to your webapp, so they will affect conversion failures on all properties of a given type.  This is in the current nightly builds.

In Struts 1.1, we need to provide finer-grained control over this as part of enhanced validation processing (i.e. things like per-property default values and such).

Craig
 

Reply via email to