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]

Reply via email to