@Override
 protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
   if (applyToAllEl == source) {
     boolean allGroup = applyToAllEl.isAtLeastSelected(1);
     table.setVisible(!allGroup);
     if (groupPassedEl != null) {
       groupPassedEl.setVisible(allGroup);
     }
     if (groupScoreEl != null) {
       groupScoreEl.setVisible(allGroup);
     }
     if (groupCommentEl != null) {
       groupCommentEl.setVisible(allGroup);
     }
   } else if (source == saveAndDoneButton) {
     if (validateFormLogic(ureq)) {
       applyChanges(true);
       fireEvent(ureq, Event.CLOSE_EVENT);
     }
   } else if (source instanceof FormLink) {
     FormLink link = (FormLink) source;
     if ("comment".equals(link.getCmd())) {
       AssessmentRow row = (AssessmentRow) link.getUserObject();
       doEditComment(ureq, row);
     }
   }
   super.formInnerEvent(ureq, source, event);
 }
 @Override
 protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
   if (addMethods.contains(source)) {
     AccessMethod method = (AccessMethod) source.getUserObject();
     addMethod(ureq, method);
   } else if (source instanceof FormLink) {
     FormLink button = (FormLink) source;
     String cmd = button.getCmd();
     if ("delete".equals(cmd)) {
       AccessInfo infos = (AccessInfo) source.getUserObject();
       acService.deleteOffer(infos.getLink().getOffer());
       confControllers.remove(infos);
     } else if ("edit".equals(cmd)) {
       AccessInfo infos = (AccessInfo) source.getUserObject();
       editMethod(ureq, infos);
     }
   }
   super.formInnerEvent(ureq, source, event);
 }
Exemplo n.º 3
0
 @Override
 protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
   if (addSliderButton == source) {
     doAddSlider();
   } else if (typeEl == source) {
     updateTypeSettings();
     updateSteps();
   } else if (stepsEl == source) {
     updateSteps();
   } else if (saveButton == source) {
     if (validateFormLogic(ureq)) {
       formOK(ureq);
     }
   } else if (source instanceof FormLink) {
     FormLink button = (FormLink) source;
     if ("delete_slider".equals(button.getCmd())) {
       doRemoveSlider((SliderRow) button.getUserObject());
     }
   }
   super.formInnerEvent(ureq, source, event);
 }