public void okPressed() {
for (int i = 0; i < addPrincipalListBox.getItemCount(); i++) {
if (addPrincipalListBox.isItemSelected(i)) {
Permission newPerm = new Permission();
newPerm.setPermissibleObject(permissibleObject);
SecurityPrincipal principal = fetchedUsers.get(addPrincipalListBox.getItemText(i));
if (principal == null) {
principal = fetchedGroups.get(addPrincipalListBox.getItemText(i));
}
newPerm.setSecurityPrincipal(principal);
permissions.add(newPerm);