public void saveTheme(FormEvent event) {
    PortletRequest req = event.getPortletRequest();
    ListBoxBean themeLB = event.getListBoxBean("themeLB");
    String theme = themeLB.getSelectedValue();

    User user = req.getUser();
    if (user != null) {
      user.setAttribute(User.THEME, theme);
      userManagerService.saveUser(user);
    }

    PortletPage page = layoutMgr.getPortletPage(req);
    page.setTheme(theme);
    layoutMgr.reloadPage(req);
  }
 /**
  * This method returns the <code>PasswordImpl</code> associated with a user and is called
  * internally by other methods in this class.
  */
 private PasswordImpl getPasswordImpl(User user) {
   PasswordImpl password = null;
   String query =
       "select pw from "
           + this.userPasswordImpl
           + " pw where pw.sportletUser.oid='"
           + user.getID()
           + "'";
   try {
     password = (PasswordImpl) pm.restore(query);
   } catch (PersistenceManagerException e) {
     _log.error("Unable to retrieve password for user", e);
   }
   return password;
 }