userSessionListeners.remove(listener);
}
public void onAdminContextChange(AdminContext ac, ChangeType changeType) {
if(changeType == ChangeType.USER_CHANGE) {
final Model user = ac.getUser();
final Model account = ac.getUserAccount();
// update the current user panel
rightNav.setCurrentUser(user);
rightNav.setCurrentAccount(account);
// clear out the views
ViewManager.get().clear();
// set the initial view based on the user's account type
ViewManager.get().dispatch(
new ShowViewRequest(MainViewClass.getMainViewClass((SmbizEntityType) account.getEntityType())));
}
else if(changeType == ChangeType.ACCOUNT_CHANGE) {
// update the current account panel
rightNav.setCurrentAccount(ac.getAccount());
}