public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
   if (roleAssignmentsDialog.getRoleAssignmentsModified()) {
     List<ProxyPentahoRole> roleList =
         Arrays.asList(
             UserAndRoleMgmtService.instance().getRoles(roleAssignmentsDialog.getUser()));
     assignedRolesList.setObjects(roleList);
     assignedRoleSelectionChanged();
   }
 }
 private void modifyRoleAssignments(ProxyPentahoUser user) {
   roleAssignmentsDialog.setUser(user);
   roleAssignmentsDialog.center();
 }
  @SuppressWarnings("unchecked")
  public UsersPanel() {
    // User List Panel
    VerticalPanel userListPanel = buildUsersListPanel();
    userListPanel.setStyleName("borderPane"); // $NON-NLS-1$
    // CSS this userListPanel.setSpacing(4);

    // User Details Panel
    VerticalPanel userDetailsDockPanel = buildUserDetailsDockPanel();
    userDetailsDockPanel.setStyleName("borderPane"); // $NON-NLS-1$
    // CSS this userDetailsDockPanel.setSpacing(4);

    add(userListPanel);
    add(userDetailsDockPanel);

    setSpacing(10);

    setCellWidth(userListPanel, "30%"); // $NON-NLS-1$
    setCellWidth(userDetailsDockPanel, "70%"); // $NON-NLS-1$
    setCellHeight(userListPanel, "100%"); // $NON-NLS-1$
    setCellHeight(userDetailsDockPanel, "100%"); // $NON-NLS-1$

    userListPanel.setWidth("100%"); // $NON-NLS-1$
    userListPanel.setHeight("100%"); // $NON-NLS-1$
    userDetailsDockPanel.setWidth("100%"); // $NON-NLS-1$
    userDetailsDockPanel.setHeight("100%"); // $NON-NLS-1$

    userDetailsPanel.setEnabled(false);
    updateUserBtn.setEnabled(false);

    newUserDialogBox.setCallback(
        new IDialogCallback() {
          public void cancelPressed() {}

          public void okPressed() {
            if (newUserDialogBox.isUserCreated()) {
              ProxyPentahoUser newUser = newUserDialogBox.getUser();
              IListBoxFilter filter = usersList.getFilter();
              if ((filter != null) && !filter.accepts(newUser)) {
                filterTextBox.setText(""); // $NON-NLS-1$
                usersList.setFilter(null);
              }
              usersList.addObject(newUser);
              usersList.setSelectedObject(newUser);
              userSelectionChanged();
              // default roles might have been added; update assigned roles list
              List<ProxyPentahoRole> roleList =
                  Arrays.asList(UserAndRoleMgmtService.instance().getRoles(newUser));
              assignedRolesList.setObjects(roleList);
              assignedRoleSelectionChanged();
            }
          }
        });
    roleAssignmentsDialog.addPopupListener(this);

    userDetailsPanel.getUserNameTextBox().setEnabled(false);

    confirmDeleteUsersDialog.setText(Messages.getString("deleteUsers")); // $NON-NLS-1$
    confirmDeleteUsersDialog.setMessage(
        Messages.getString("confirmUserDeletionMsg")); // $NON-NLS-1$
    confirmDeleteUsersDialog.setOnOkHandler(
        new ICallback() {
          public void onHandle(Object o) {
            confirmDeleteUsersDialog.hide();
            deleteSelectedUsers();
            assignedRoleSelectionChanged();
          }
        });

    confirmRemoveRoleAssignmentDialog.setText(Messages.getString("unassignRoles")); // $NON-NLS-1$
    confirmRemoveRoleAssignmentDialog.setMessage(
        Messages.getString("confirmUnassignRolesMsg")); // $NON-NLS-1$
    confirmRemoveRoleAssignmentDialog.setOnOkHandler(
        new ICallback() {
          public void onHandle(Object o) {
            confirmRemoveRoleAssignmentDialog.hide();
            unassignSelectedRoles();
            assignedRoleSelectionChanged();
          }
        });
  }