JbsUserGroupsRemote jbsUserGroups = (JbsUserGroupsRemote) ClientTools.getRemoteBean(JbsUserGroupsRemote.class);
super.doSave();
if (this.getDlgState() == DlgState.dsInsert) {
System.out.println("Adding new entity");
jbsUserGroups.createGroup(this.getUserGroup());
} else if (this.getDlgState() == DlgState.dsEdit) {
System.out.println("Saving existing entity " + this.getUserGroup().getId() + ".");
jbsUserGroups.updateDataset(this.getUserGroup());
}
System.out.println("Entity saved.");