+1
As mentioned, to refresh the model, we remove the existing model and
push the latest version. For a "refresh" operation, we might expect
the new instance to replace the old instance in the same stack
position.
In RefreshModelBeforeResult, we already have a reference to the old
model ("Item"). Could we just replace one object with another?
for (Object item : root) {
if (item == newModel) {
needsRefresh = false;
}
+ else {
+ item = newModel
+ }
*
http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java
Or would there be side-effects?
HTH, Ted.
On Wed, Jul 16, 2008 at 7:22 PM, Jeromy Evans
<[EMAIL PROTECTED]> wrote:
> Dave Newton wrote:
>>
>> It appears as though ModelDrivenInterceptor could change the stack order
>> when a refresh is necessary; the old model is removed from wherever it was
>> in the stack and the new model is simply pushed.
>>
>>
>
> Is it possible to make it do a replace within the stack?
>
> If not, rather than document it, I'd prefer that it throws an exception
> (stack order changed exception/model not at top of stack exception/something
> like that exception), so the developer's attention is drawn to it. These
> kinds of things cause apparently intermittent & difficult to isolate
> problems.
> The i18n tag had a similar issue when its closing tag liberally popped
> anything off the top of the stack (now throws)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
HTH, Ted
http://husted.com/ted/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]