struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Belingueres" <belingue...@gmail.com>
Subject Re: Sanity-check regarding ModelDrivenInterceptor vs. stack order
Date Thu, 17 Jul 2008 02:05:04 GMT
I believe that we could check on stack.push() if the object to push
shadows some other object in the stack with relative ease.

The basic idea would be to use a Map<String,Object> where the key is
the property name, and the value is the object in the stack with that
property name. If the yet to push object has a property that is
already in the Map, then it would shadow it (unless of course it is
actually the same object), and a warn can be logged/exception thrown
(in devMode only).

2008/7/16 Dave Newton <newton.dave@yahoo.com>:
> --- On Wed, 7/16/08, Jeromy Evans wrote:
>> Is it possible to make it do a replace within the stack?
>
> The stack implementation is an ArrayList subclass, so I suppose it could do an indexOf/set
(if the new model isn't null, anyway, in which case the stack could still change :/
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

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


Mime
View raw message