}
public void handleLogin(String username)
throws NoSuchAccountException, InvalidIdentifierException {
Account account = _accountControl.getAccount(username);
// Throw an exception if the user is not found
if(account == null)
throw new NoSuchAccountException("Unknown user: " + username);
// and set the account (this toggles the user's logged in status)
setAccount(account);
// set the user's favorites list if they are logged in
if (account.isMyListOpt())
{
Product[] favProducts = _catalogControl.getProductListByCategory(account.getFavCategory());
setMyList(favProducts);
}
}