Please add an issue to JIRA. Although we have unit and integration tests covering the application state mechanism it is still possible that there is a bug.
On 10/27/07, Christoph Jaeger <[EMAIL PROTECTED]> wrote: > > Hi, > > after upgrading from 5.0.5 to 5.0.6 (which was not too difficult thanks > to some messages on this list), 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? > > I hope the description provided is clear, the actual code involved is a > bit more complicate than mentioned here, and would take a long time to > read. On the other hand, creating a small example demonstrating the > problem would also take some time, maybe someone knows where the problem > lies with this description already. If not, I will sit down and create a > small example. > > Thanks, > > Best Regards, > > Christoph Jäger > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind