[
https://issues.apache.org/jira/browse/TAPESTRY-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547303
]
Christoph Jäger commented on TAPESTRY-1865:
-------------------------------------------
Sorry if my text was confusing.
I expect the MenuBar component to see the changes, as the changes are in an
@ApplicationState marked property. This should be persisted somewhere in the
server side session.
> ApplicationState depending on order of usage
> --------------------------------------------
>
> Key: TAPESTRY-1865
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1865
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.6
> Reporter: Christoph Jäger
>
> (Basically copied from my email in the mailing list)
> After upgrading from 5.0.5 to 5.0.6 my application somehow seems to not work
> with the @ApplicationState as before.
> I have three components on my page:
> - LanguageSwitch
> - MenuBar
> - Login
> Depending on who is logged in and the selected language, a different
> menu is displayed. All three components have a property
> @ApplicationState private Menu menu;
> MenuBar has an additional property
> private boolean menuExists;
> to query if a menu has yet been set.
> When the language is switched, the component calls "menu=null;" to force
> the MenuBar component to create a new menu.
> When someone logs in or out, the Login component calls "menu=null;" for
> the same reason.
> The MenuBar component calculates a new menu (based on selected language
> and logged in user) if it finds that there is no existing menu
> (menuExists==false).
> This setup worked as expected in 5.0.5, but after I switched to 5.0.6,
> the menu=null in the Login component seems to get ignored (from
> LanguageSwitch it works as before). I think it depends on the order of
> components: LanguageSwitch is before MenuBar, so MenuBar sees the
> changes done in LanguageSwitch, but not the changes done in Login.
> The Login component calls menu=null in two places: in
> onSuccessFromFormLogin(), after the "Login" submit button was clicked,
> and onActionFromLogout(), after the ActionLink titled "logout" is
> clicked. I get the same behaviour for both calls.
> What is strange here: adding some logging, I see that the click on the
> "Switch Language" ActionLink, as well as the "logout" ActionLink and the
> click on the "Login" button create two requests (this is as expected).
> In the first request, menu=null is called. In the second request, the
> MenuBar component checks for the existence of the menu property. Why
> does the MenuBar in the second request not see the changes done in the
> first request?
> If a small example showing the problem is needed, please let me know.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]