struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <hrab...@gmail.com>
Subject Re: Using Extends with validate or unknown
Date Thu, 05 Jan 2006 14:48:01 GMT
(Apologies for the late reply; I've been offline.)

On 1/3/06, Ted Husted <ted.husted@gmail.com> wrote:
> Given
>
>         <action path="/Register"
>                 name="RegisterForm"
>                 validate="false"
>                 ...
>                 />
>
>         <action path="/RegisterSave"
>                 extends="/Register"
>                 validate="true"
>                 .../>
>
> The value of validate remains false.
>
<snip/>
> We probably have the same problem with "unknown", which is tjhe other boolean.
>
> Evidentally, the test wants to be sure that extends does not step on
> any values already set.

Correct.

> Except for the two booleans, we otherwise test
> for null, and this strategy seems sound, since we don't have a
> mechanism for setting a null from a configuration file.
>

We also have boolean props in other config classes.
The problem is not only with booleans, but with ints as well (like
FormPropertyConfig's "size").  If there are String props which need to
distinguish between null and an empty String, the problem is there as
well.

Right now, this is a limitation of the "extends" functionality. 
("Can't reset a field to a default value once a base config sets it")

> I've only started to think about this, but wanted to fire something
> off in case someone saw an obvious solution.

If we solve this for booleans and ints, shouldn't String fields be
allowed to go back to default values as well?

> -Ted.
>

Hubert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message