You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dpr <dp...@aha.lt> on 2008/04/28 22:03:28 UTC

ValidationTracker and @Persist("flash")

Hi,

I have a problem with tapestry 5.0.12-SNAPSHOT where the session is filled
with attributes having names like flash:Login:form:defaultTracker that
reference ValidationTracker objects.

These objects are stored using the flash persistence strategy [1],
but I see the effects similar to [2].

I think I found what the culprit might be.
It's the last statement in Form.cleanupRender():
    _tracker = _environment.pop(ValidationTracker.class);

So, the tracker parameter is updated on every page render.

Because this parameter is bound to the defaultTracker property
that is marked @Persist("flash") it is put in the session on every page 
render.

Also the tracker parameter is updated on form submit in method onAction.

So the defaultTracker property effectively stays in the session forever.

Now I'm working around this problem with
    void cleanupRender()
    {
        form.setDefaultTracker(null);
    }
in my pages.

So I would like to ask if somebody else is seeing this,
or I'm missing something?

If tracker must be updated on every page render, then what's the purpose
of making defaultTracker @Persist("flash") ?


    dpr

[1] https://issues.apache.org/jira/browse/TAPESTRY-2354
[2] 
http://www.nabble.com/T5%3A-refreshing-page-when-there-is-an-error-to13214217.html



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org