You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Fernando (JIRA)" <ji...@apache.org> on 2008/12/19 21:08:44 UTC

[jira] Resolved: (TAP5-320) Flash Persist Variables might be cleared too aggressively

     [ https://issues.apache.org/jira/browse/TAP5-320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando resolved TAP5-320.
---------------------------

    Resolution: Won't Fix

I'll back down on this one for now..

The changed my code to use PagePool instead of RequestPageCache, so that when I picked up a page it would not go through an attach/detach cycle, thus clearing all of the flash variables prematurely.

Like you said, though it isn't exactly doing what it says it does ( clear variables on next RENDER ), it does behave very close to that with minimal code.. :) :) ( it clears variables on next ATTACH )

thank you for tapestry!!

> Flash Persist Variables might be cleared too aggressively
> ---------------------------------------------------------
>
>                 Key: TAP5-320
>                 URL: https://issues.apache.org/jira/browse/TAP5-320
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.16
>            Reporter: Fernando
>
> So yes it looks like the Flash variables of a Page are scrubbed when the page is removed from the cache, no matter if it's rendered or not.  The stack trace is below.
> I know that my example might be a bit extreme, but here are some other usecases that should be affected as well:
> -- Page Rendering
> 1) render PageA (set flash variable).
> 2) render PageB
>   a) while rendering, it loads PageA for some reason
>      (RequestPageCache.get, PageLink, ActionLink, etc)
>   b) while loading PageA, its flash variables are cleared
> 3) render PageA (flash variable is null)
> -- Ajax
> 1) render PageA (set flash variable).
> 2) Ajax callback to app
>   a) either hitting PageA directly, or hitting PageB that
>      refers to PageA in some way
>      ( PageLink, ActionLink, RequestPageCache.get )
>   b) while loading PageA, its flash variables are cleared
> 3) render PageA (flash variable is null)
> STACK TRACE:
> showing that flash variables are cleared from pages once they are loaded, not once they are rendered, so it can be cleared way before we have a change to render it.
> setAttribute( flash:core/Start:status.cheerform:defaultTracker, null )
>     at org.apache.tapestry5.internal.services.SessionImpl.setAttribute(SessionImpl.java:50)
>     at org.apache.tapestry5.internal.services.FlashPersistentFieldStrategy.didReadChange(FlashPersistentFieldStrategy.java:41)
>     at org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy.gatherFieldChanges(AbstractSessionPersistentFieldStrategy.java:65)
>     at org.apache.tapestry5.internal.services.PersistentFieldManagerImpl.gatherChanges(PersistentFieldManagerImpl.java:65)
>     at $PersistentFieldManager_11d5412d051.gatherChanges($PersistentFieldManager_11d5412d051.java)
>     at org.apache.tapestry5.internal.structure.PageImpl.getFieldChange(PageImpl.java:185)
>     at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.getFieldChange(InternalComponentResourcesImpl.java:111)
>     at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.hasFieldChange(InternalComponentResourcesImpl.java:121)
>     at com.protrade.fanwars.base.pages.Start.containingPageDidAttach(Start.java)
>     at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:80)
>     at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:912)
>     at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:726)
>     at org.apache.tapestry5.internal.structure.PageImpl.attached(PageImpl.java:151)
>     at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:55)
>     at $RequestPageCache_11d5412d04b.get($RequestPageCache_11d5412d04b.java)
>     at $RequestPageCache_11d5412d046.get($RequestPageCache_11d5412d046.java)
>     at com.protrade.facebook.base.services.FbForceModeFilter.handle(FbForceModeFilter.java:57)
>   (this is my PageRenderRequestFilter which cuts off page rendering)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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