Hi there, I just found a little bit of a hack. OnSuccess I just return an action-link. So I guess that Tapestry just thinks the form processing failed and 'rolled back' the application state changes.
So the question is again, what is wrong? Cheers, Martin (Kersten) -----Ursprüngliche Nachricht----- Von: Martin Kersten [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 3. Juni 2008 14:21 An: Tapestry users Betreff: ApplicationState not stored during onSuccess? Hi, I have a simple login status. When doing a login, the user -object is stored using login.setUser(user). Two places where this can happen one works (onAction) and one it doesn't work (onSuccess). First is triggered by action-link using a context and second is triggered by an ordinary form. Both logins are correctly performed and loginStatus is correctly Updated, but the later one (onSuccess) the application state object is not remembered (updated) correctly. What is wrong? (Using tapestry 5.11) Following code-snippets I have: ... @ApplicationState private LoginStatus loginStatus; ... private void login(String name, String password) { User user = userService.login(name, password); loginStatus.setUser(user); } ... public boolean onAction(String name, String password) { login(name, password); //works well return true; } ... public Object onSuccess() { if(name != null && password != null) //results in correct login but loginStatus change is //not remembered afterwards login(name, password); return true; } Thanks for any hint or help, Martin (Kersten) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]