diff --git a/src/main/java/de/bps/course/nodes/ll/LLEditForm.java b/src/main/java/de/bps/course/nodes/ll/LLEditForm.java index e4e81485d9469db89334aea89e4181f846a5e3d5..38429bb5d6382074fd16f7b714a64d38fa20fdf0 100644 --- a/src/main/java/de/bps/course/nodes/ll/LLEditForm.java +++ b/src/main/java/de/bps/course/nodes/ll/LLEditForm.java @@ -323,7 +323,7 @@ public class LLEditForm extends FormBasicController { return true; } }); - lTarget.addActionListener(this, FormEvent.ONCHANGE); + lTarget.addActionListener(FormEvent.ONCHANGE); lTarget.setUserObject(link); lTargetInputList.add(index, lTarget); //add html target diff --git a/src/main/java/de/bps/course/nodes/vc/VCEditForm.java b/src/main/java/de/bps/course/nodes/vc/VCEditForm.java index d68e12387169a515e856d1d72ed4f25d8577c48c..0bf38d223b4838dedc52e2d8bf948f405e731a05 100644 --- a/src/main/java/de/bps/course/nodes/vc/VCEditForm.java +++ b/src/main/java/de/bps/course/nodes/vc/VCEditForm.java @@ -127,7 +127,7 @@ public class VCEditForm extends FormBasicController { String[] accessVals = new String[] {translate(OPTION_DATES)}; multiSelectOptions = uifactory.addCheckboxesVertical("vc.options", "vc.options.label", editVC, accessKeys, accessVals, null, 1); multiSelectOptions.select(OPTION_DATES, useDates); - multiSelectOptions.addActionListener(this, FormEvent.ONCHANGE); + multiSelectOptions.addActionListener(FormEvent.ONCHANGE); // create gui elements for all meetings editVC.contextPut("useDates", useDates); diff --git a/src/main/java/de/bps/course/nodes/vc/VCSelectionForm.java b/src/main/java/de/bps/course/nodes/vc/VCSelectionForm.java index dfebca4471747ce46339dd6278c2d3b40c81358b..5a499d000641263a55099d1362fe68776e2d5f4b 100644 --- a/src/main/java/de/bps/course/nodes/vc/VCSelectionForm.java +++ b/src/main/java/de/bps/course/nodes/vc/VCSelectionForm.java @@ -67,7 +67,7 @@ public class VCSelectionForm extends FormBasicController { selVC = uifactory.addDropdownSingleselect("config.select.vc", flc, keys, vals, null); selVC.select(selectedProvider, true); - selVC.addActionListener(this, FormEvent.ONCHANGE); + selVC.addActionListener(FormEvent.ONCHANGE); } @Override diff --git a/src/main/java/de/bps/course/nodes/vc/provider/adobe/AdobeEditForm.java b/src/main/java/de/bps/course/nodes/vc/provider/adobe/AdobeEditForm.java index a4da89c1c936bb4e518ac182ec4c72c05976aaf8..d897a52b6fade6ab4f697cf9108806b708d0481c 100644 --- a/src/main/java/de/bps/course/nodes/vc/provider/adobe/AdobeEditForm.java +++ b/src/main/java/de/bps/course/nodes/vc/provider/adobe/AdobeEditForm.java @@ -70,7 +70,7 @@ public class AdobeEditForm extends FormBasicController { multiSelectOptions.select(OPTION_START_MEETING, !config.isGuestStartMeetingAllowed()); multiSelectOptions.select(OPTION_OPEN_MEETING, !config.isGuestAccessAllowed()); multiSelectOptions.setVisible(showOptions); - multiSelectOptions.addActionListener(this, FormEvent.ONCHANGE); + multiSelectOptions.addActionListener(FormEvent.ONCHANGE); multiSelectOptions.showLabel(false); submit = new FormSubmit("subm", "submit"); diff --git a/src/main/java/de/bps/olat/modules/cl/ChecklistManageCheckpointsController.java b/src/main/java/de/bps/olat/modules/cl/ChecklistManageCheckpointsController.java index 66e52b7c58c272c833638d5f809afa826dfff2fd..76712bafe7042d305a5a3ac0d670e223ab762e2f 100644 --- a/src/main/java/de/bps/olat/modules/cl/ChecklistManageCheckpointsController.java +++ b/src/main/java/de/bps/olat/modules/cl/ChecklistManageCheckpointsController.java @@ -472,7 +472,7 @@ class GroupChoiceForm extends FormBasicController { } groupChoice = uifactory.addDropdownSingleselect("cl.choice.groups", "cl.choice.groups", mainLayout, keys, values, null); - groupChoice.addActionListener(this, FormEvent.ONCHANGE); + groupChoice.addActionListener(FormEvent.ONCHANGE); groupChoice.select(CHOICE_ALL, true); exportButton = uifactory.addFormLink(EXPORT_TABLE, EXPORT_TABLE, null, mainLayout, Link.BUTTON); diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java index dc9bcbc2fba38bf605d56e25e52f760ca4e73888..fb8f6b392a40bab536f1f7bb246b8f4bb1bea668 100644 --- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java +++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java @@ -196,7 +196,7 @@ public class IQEditForm extends FormBasicController { // Only assessments have a limitation on number of attempts if (isAssessment) { limitAttempts.select("xx", confAttempts > 0); - limitAttempts.addActionListener(this, FormEvent.ONCLICK); + limitAttempts.addActionListener(FormEvent.ONCLICK); } else { limitAttempts.select("xx", false); limitAttempts.setVisible(false); @@ -210,7 +210,7 @@ public class IQEditForm extends FormBasicController { //Surveys do not have a solution if(!isSurvey){ allowShowSolutionBox = uifactory.addCheckboxesVertical("allowShowSolution", "qti.form.allowShowSolution", formLayout, allowShowSolution, valuesShowSolution, null, 1); - allowShowSolutionBox.addActionListener(this, FormEvent.ONCLICK); + allowShowSolutionBox.addActionListener(FormEvent.ONCLICK); if(confAllowShowSolution!=null){ allowShowSolutionBox.select(ALLOW, confAllowShowSolution); } else if (isSelfTest){ @@ -224,7 +224,7 @@ public class IQEditForm extends FormBasicController { String[] valuesSuspesion = new String[] { "" }; allowSuspensionBox = uifactory.addCheckboxesVertical("allowSuspension", "qti.form.allowSuspension", formLayout, allowSuspension, valuesSuspesion, null, 1); - allowSuspensionBox.addActionListener(this, FormEvent.ONCLICK); + allowSuspensionBox.addActionListener(FormEvent.ONCLICK); if (confAllowSuspension != null) { allowSuspensionBox.select(ALLOW, confAllowSuspension); } else if (isSelfTest) { @@ -289,7 +289,7 @@ public class IQEditForm extends FormBasicController { showResultsOnHomePage = uifactory.addCheckboxesVertical("qti_enableResultsOnHomePage", "qti.form.results.onhomepage", formLayout, new String[] { "xx" }, new String[] { null }, null, 1); showResultsOnHomePage.select("xx", confEnableShowResultOnHomePage); - showResultsOnHomePage.addActionListener(this, FormEvent.ONCLICK); + showResultsOnHomePage.addActionListener(FormEvent.ONCLICK); showResultsOnHomePage.setVisible(!isSurvey); Boolean showResultsActive = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_DATE_DEPENDENT_RESULTS); @@ -302,7 +302,7 @@ public class IQEditForm extends FormBasicController { new String[] { null }, null, 1); if (isAssessment || isSelfTest) { showResultsDateDependentButton.select("xx", showResultsDateDependent); - showResultsDateDependentButton.addActionListener(this, FormEvent.ONCLICK); + showResultsDateDependentButton.addActionListener(FormEvent.ONCLICK); } else { showResultsDateDependentButton.setEnabled(false); } diff --git a/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java b/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java index b85dc027c8e89cd5127fc94e7c66424300ef340e..011eb3d9adf7ceb5d384d5beb6488a43bf5af1ae 100644 --- a/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java +++ b/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java @@ -811,21 +811,18 @@ public class OnyxRunController extends BasicController { @Override protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { - startButton = FormUIFactory.getInstance().addFormLink(START_LABEL, resumeSuspended ? RESUME_LABEL : START_LABEL, null, flc, Link.BUTTON); - // ((Link) startButton.getComponent()).setContextMenuAllowed(false); - startButton.addActionListener(OnyxRunController.this, FormEvent.ONCLICK); + startButton.addActionListener(FormEvent.ONCLICK); } @Override protected void formOK(UserRequest ureq) { - // TODO Auto-generated method stub - + // } @Override protected void doDispose() { - // TODO Auto-generated method stub + // } @Override diff --git a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep00.java b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep00.java index 087bf57d6af012d8646c2797ba523964a7cf9b25..1bd0f1c427b269e34a154b8bf2e06a1572c9dcb6 100644 --- a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep00.java +++ b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep00.java @@ -182,10 +182,10 @@ public class CcStep00 extends BasicStep { String[] cssClasses = new String[] { "cc_sp", "en_sp", "bc_sp", "fo_sp", "co_sp", }; // show checkbox rightsChooser = FormUIFactory.getInstance().addCheckboxesVertical("rightsChooser", fic, keys, values, cssClasses, 1); - rightsChooser.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + rightsChooser.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 // create edit button for enrollment and hide it editButtonEnrollment = FormUIFactory.getInstance().addFormLink("cce.edit", fic); - editButtonEnrollment.addActionListener(this, FormEvent.ONCLICK); + editButtonEnrollment.addActionListener(FormEvent.ONCLICK); editButtonEnrollment.setVisible(false); } diff --git a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep02.java b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep02.java index 8f97a65d045c778c28ffb2622147b6c776908a03..1b81d251a573a796860491cf2697171712396745 100644 --- a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep02.java +++ b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/CcStep02.java @@ -148,7 +148,6 @@ public class CcStep02 extends BasicStep { } @Override - @SuppressWarnings( { "unused", "synthetic-access" }) protected void initForm(FormItemContainer formLayout, Controller listener, final UserRequest ureq) { fic = FormLayoutContainer.createCustomFormLayout("cc02", this.getTranslator(), this.velocity_root + "/CcStep02_form.html"); FormLayoutContainer formItems = FormLayoutContainer.createDefaultFormLayout("formItems", this.getTranslator()); @@ -160,9 +159,9 @@ public class CcStep02 extends BasicStep { publishCheckbox.setLabel("car.makepublic", null); publishCheckbox.select("ison", true); - publishCheckbox.addActionListener(this, FormEvent.ONCHANGE); + publishCheckbox.addActionListener(FormEvent.ONCHANGE); // register for on click event to hide/disable other elements - publishCheckbox.addActionListener(this, FormEvent.ONCLICK); + publishCheckbox.addActionListener(FormEvent.ONCLICK); int numOpts = showAclInst ? 3 : 2; keys = new String[numOpts]; @@ -185,22 +184,16 @@ public class CcStep02 extends BasicStep { accessChooser.setLabel("car.label", null); accessChooser.select(CourseCreationConfiguration.ACL_OLAT, true); - accessChooser.addActionListener(this, FormEvent.ONCHANGE); + accessChooser.addActionListener(FormEvent.ONCHANGE); // text warning warning = FormUIFactory.getInstance().addStaticTextElement("car.warning.text", "car.label", translate("car.warning.text"), formItems); // rules to hide / unhide - Set<FormItem> targetsDoPublish = new HashSet<FormItem>() { - { - add(accessChooser); - } - }; - Set<FormItem> targetsDontPublish = new HashSet<FormItem>() { - { - add(warning); - } - }; + Set<FormItem> targetsDoPublish = new HashSet<>(); + targetsDoPublish.add(accessChooser); + Set<FormItem> targetsDontPublish = new HashSet<>(); + targetsDontPublish.add(warning); RulesFactory.createHideRule(publishCheckbox, null, targetsDoPublish, formItems); RulesFactory.createShowRule(publishCheckbox, "ison", targetsDoPublish, formItems); diff --git a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/EnrollmentEditForm.java b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/EnrollmentEditForm.java index a76365c2ebfaf2e001c56cbd491c684afeae7ee4..7f425623d9a38e5ace8043338fe3325965bb56e9 100644 --- a/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/EnrollmentEditForm.java +++ b/src/main/java/de/tuchemnitz/wizard/workflows/coursecreation/steps/EnrollmentEditForm.java @@ -143,7 +143,7 @@ public class EnrollmentEditForm extends FormBasicController { accessLimit = uifactory.addCheckboxesVertical("accessLimit", formLayout, keys, values, null, 1); accessLimit.setLabel("en.accesscheckbox", null); accessLimit.select("ison", courseConfig.getEnableAccessLimit()); - accessLimit.addActionListener(this, FormEvent.ONCLICK); + accessLimit.addActionListener(FormEvent.ONCLICK); keys = new String[elements.size()]; values = new String[elements.size()]; diff --git a/src/main/java/org/olat/admin/layout/LayoutAdminController.java b/src/main/java/org/olat/admin/layout/LayoutAdminController.java index 6791ff1871debaa828507a327dddcd34b8047adf..9c68e00fa283500ed0e4d492ed25c215270e41d6 100644 --- a/src/main/java/org/olat/admin/layout/LayoutAdminController.java +++ b/src/main/java/org/olat/admin/layout/LayoutAdminController.java @@ -78,7 +78,7 @@ public class LayoutAdminController extends FormBasicController { break; } } - themeSelection.addActionListener(listener, FormEvent.ONCHANGE); + themeSelection.addActionListener(FormEvent.ONCHANGE); } diff --git a/src/main/java/org/olat/admin/privacy/PrivacyAdminController.java b/src/main/java/org/olat/admin/privacy/PrivacyAdminController.java index 0791b466482e0dd4c6fcc85e4e38aa4ee870d44f..0a93314a715417527e3a23c5afeb3a665b21aff8 100644 --- a/src/main/java/org/olat/admin/privacy/PrivacyAdminController.java +++ b/src/main/java/org/olat/admin/privacy/PrivacyAdminController.java @@ -77,7 +77,7 @@ public class PrivacyAdminController extends FormBasicController { adminPropsEl.select("usermanagers", "enabled".equals(module.getUserSearchAdminPropsForUsermanagers())); adminPropsEl.select("groupmanagers", "enabled".equals(module.getUserSearchAdminPropsForGroupmanagers())); adminPropsEl.select("administrators", "enabled".equals(module.getUserSearchAdminPropsForAdministrators())); - adminPropsEl.addActionListener(this, FormEvent.ONCHANGE); + adminPropsEl.addActionListener(FormEvent.ONCHANGE); uifactory.addSpacerElement("admin.space.1", propsCont, true); @@ -87,7 +87,7 @@ public class PrivacyAdminController extends FormBasicController { lastloginEl.select("usermanagers", "enabled".equals(module.getUserLastLoginVisibleForUsermanagers())); lastloginEl.select("groupmanagers", "enabled".equals(module.getUserLastLoginVisibleForGroupmanagers())); lastloginEl.select("administrators", "enabled".equals(module.getUserLastLoginVisibleForAdministrators())); - lastloginEl.addActionListener(this, FormEvent.ONCHANGE); + lastloginEl.addActionListener(FormEvent.ONCHANGE); FormLayoutContainer tuCont = FormLayoutContainer.createDefaultFormLayout("tu", getTranslator()); formLayout.add(tuCont); @@ -96,7 +96,7 @@ public class PrivacyAdminController extends FormBasicController { tunnelEl = uifactory.addCheckboxesHorizontal("tunnel.cbb", tuCont, onKeys, new String[]{""}, null); tunnelEl.select("on", "enabled".equals(module.getUserInfosTunnelCourseBuildingBlock())); - tunnelEl.addActionListener(this, FormEvent.ONCHANGE); + tunnelEl.addActionListener(FormEvent.ONCHANGE); } @Override diff --git a/src/main/java/org/olat/admin/properties/AdvancedPropertySearchForm.java b/src/main/java/org/olat/admin/properties/AdvancedPropertySearchForm.java index a4101b89e5a37806b6051f34eb0f7ca0654d9ab4..71eac72cc07ce100b1b0336628f1d62cfb48a543 100644 --- a/src/main/java/org/olat/admin/properties/AdvancedPropertySearchForm.java +++ b/src/main/java/org/olat/admin/properties/AdvancedPropertySearchForm.java @@ -148,7 +148,7 @@ public class AdvancedPropertySearchForm extends FormBasicController { // Don't use submit button, form should not be marked as dirty since this is // not a configuration form but only a search form (OLAT-5626) searchButton = uifactory.addFormLink("search", formLayout, Link.BUTTON); - searchButton.addActionListener(this, FormEvent.ONCLICK); + searchButton.addActionListener(FormEvent.ONCLICK); resourceTypeId.setRegexMatchCheck("\\d*", "error.search.form.onlynumbers"); } diff --git a/src/main/java/org/olat/admin/registration/SystemRegistrationAdminController.java b/src/main/java/org/olat/admin/registration/SystemRegistrationAdminController.java index f6a993847fddddd167982de8c1babe494988f598..6f8b6909a5f6e7c3ecec948d13f4a7c8d50e11db 100644 --- a/src/main/java/org/olat/admin/registration/SystemRegistrationAdminController.java +++ b/src/main/java/org/olat/admin/registration/SystemRegistrationAdminController.java @@ -100,7 +100,7 @@ public class SystemRegistrationAdminController extends FormBasicController { // Add website publishWebSiteSelection = uifactory.addCheckboxesVertical("registration.publishWebSiteSelection", null, formLayout, new String[] { YES }, new String[] { "" }, null, 1); - publishWebSiteSelection.addActionListener(this, FormEvent.ONCLICK); + publishWebSiteSelection.addActionListener(FormEvent.ONCLICK); boolean publishWebsiteConfig = registrationModule.isPublishWebsite(); publishWebSiteSelection.select(YES, publishWebsiteConfig); flc.contextPut("isRegisteredWeb", Boolean.valueOf(publishWebsiteConfig)); @@ -108,7 +108,7 @@ public class SystemRegistrationAdminController extends FormBasicController { // Add website description String webSiteDesc = registrationModule.getWebsiteDescription(); webSiteDescription = uifactory.addTextAreaElement("registration.webSiteDescription", 5, 60, webSiteDesc, formLayout); - webSiteDescription.addActionListener(this, FormEvent.ONCHANGE); + webSiteDescription.addActionListener(FormEvent.ONCHANGE); flc.contextPut("webSiteURL", Settings.getServerContextPathURI()); RulesFactory.createHideRule(publishWebSiteSelection, null, webSiteDescription, formLayout); RulesFactory.createShowRule(publishWebSiteSelection, YES, webSiteDescription, formLayout); @@ -124,7 +124,7 @@ public class SystemRegistrationAdminController extends FormBasicController { // Add announce list addToAnnounceListSelection = uifactory.addCheckboxesVertical("registration.addToAnnounceListSelection", null, formLayout, new String[] { YES }, new String[] { "" }, null, 1); - addToAnnounceListSelection.addActionListener(this, FormEvent.ONCLICK); + addToAnnounceListSelection.addActionListener(FormEvent.ONCLICK); addToAnnounceListSelection.select(YES, registrationModule.isNotifyReleases()); // // Add email field diff --git a/src/main/java/org/olat/admin/restapi/RestapiAdminController.java b/src/main/java/org/olat/admin/restapi/RestapiAdminController.java index 6fcf010983ba56c4f64bf9cb7ab721b113a71ba9..eca2fb909ba8d46d63b91ce005089c1a3ab741ac 100644 --- a/src/main/java/org/olat/admin/restapi/RestapiAdminController.java +++ b/src/main/java/org/olat/admin/restapi/RestapiAdminController.java @@ -89,7 +89,7 @@ public class RestapiAdminController extends FormBasicController { String[] values = new String[] { getTranslator().translate("rest.on") }; enabled = uifactory.addCheckboxesHorizontal("rest.enabled", accessDataFlc, keys, values, null); enabled.select(keys[0], restEnabled); - enabled.addActionListener(this, FormEvent.ONCHANGE); + enabled.addActionListener(FormEvent.ONCHANGE); accessDataFlc.setVisible(true); formLayout.add(accessDataFlc); @@ -99,12 +99,12 @@ public class RestapiAdminController extends FormBasicController { String[] valueGrps = new String[] { getTranslator().translate("rest.on") }; managedGroupsEl = uifactory.addCheckboxesHorizontal("managed.group", managedFlc, keys, valueGrps, null); - managedGroupsEl.addActionListener(this, FormEvent.ONCHANGE); + managedGroupsEl.addActionListener(FormEvent.ONCHANGE); managedGroupsEl.select(keys[0], groupModule.isManagedBusinessGroups()); String[] valueRes = new String[] { getTranslator().translate("rest.on") }; managedRepoEl = uifactory.addCheckboxesHorizontal("managed.repo", managedFlc, keys, valueRes, null); - managedRepoEl.addActionListener(this, FormEvent.ONCHANGE); + managedRepoEl.addActionListener(FormEvent.ONCHANGE); managedRepoEl.select(keys[0], repositoryModule.isManagedRepositoryEntries()); } } diff --git a/src/main/java/org/olat/admin/security/SecurityAdminController.java b/src/main/java/org/olat/admin/security/SecurityAdminController.java index 85a484d0f46e12dfa565bcae3f27f85213836ccd..919cd41e7d81f95d7a40c5b730d6f9a775047ebe 100644 --- a/src/main/java/org/olat/admin/security/SecurityAdminController.java +++ b/src/main/java/org/olat/admin/security/SecurityAdminController.java @@ -64,17 +64,17 @@ public class SecurityAdminController extends FormBasicController { // on: force top top frame (more security); off: allow in frame (less security) topFrameEl = uifactory.addCheckboxesHorizontal("sec.topframe", "sec.topframe", formLayout, keys, values, null); topFrameEl.select("on", securityModule.isForceTopFrame()); - topFrameEl.addActionListener(this, FormEvent.ONCHANGE); + topFrameEl.addActionListener(FormEvent.ONCHANGE); // on: block wiki (more security); off: do not block wiki (less security) wikiEl = uifactory.addCheckboxesHorizontal("sec.wiki", "sec.wiki", formLayout, keys, values, null); wikiEl.select("off", securityModule.isWikiEnabled()); - wikiEl.addActionListener(this, FormEvent.ONCHANGE); + wikiEl.addActionListener(FormEvent.ONCHANGE); // on: force file download in folder component (more security); off: allow execution of content (less security) forceDownloadEl = uifactory.addCheckboxesHorizontal("sec.download", "sec.force.download", formLayout, keys, values, null); forceDownloadEl.select("on", folderModule.isForceDownload()); - forceDownloadEl.addActionListener(this, FormEvent.ONCHANGE); + forceDownloadEl.addActionListener(FormEvent.ONCHANGE); } @Override diff --git a/src/main/java/org/olat/admin/site/ui/SitesConfigurationController.java b/src/main/java/org/olat/admin/site/ui/SitesConfigurationController.java index 78a65f7feeb2ee5419cc9d51bd4b2bd0a3d0d12f..ad0a02af284a99062e4630f2df983e737b1c5b11 100644 --- a/src/main/java/org/olat/admin/site/ui/SitesConfigurationController.java +++ b/src/main/java/org/olat/admin/site/ui/SitesConfigurationController.java @@ -293,7 +293,7 @@ public class SitesConfigurationController extends FormBasicController { String id = config.getId(); secCallbackEl = uifactory.addDropdownSingleselect("site.security." + id, "site.security", formLayout, secKeys, secValues, null); - secCallbackEl.addActionListener(SitesConfigurationController.this, FormEvent.ONCHANGE); + secCallbackEl.addActionListener(FormEvent.ONCHANGE); secCallbackEl.setUserObject(this); boolean needAlt = false; @@ -308,10 +308,10 @@ public class SitesConfigurationController extends FormBasicController { } enableSiteEl = uifactory.addCheckboxesHorizontal("site.enable." + id, null, formLayout, new String[]{ "x" }, new String[]{ "" }, null); - enableSiteEl.addActionListener(SitesConfigurationController.this, FormEvent.ONCHANGE); + enableSiteEl.addActionListener(FormEvent.ONCHANGE); altControllerEl = uifactory.addDropdownSingleselect("site.alternative." + id, "site.alternative", formLayout, altKeys, altValues, null); - altControllerEl.addActionListener(SitesConfigurationController.this, FormEvent.ONCHANGE); + altControllerEl.addActionListener(FormEvent.ONCHANGE); altControllerEl.setVisible(needAlt); if(StringHelper.containsNonWhitespace(config.getAlternativeControllerBeanId())) { for(String altKey:altKeys) { diff --git a/src/main/java/org/olat/admin/user/SystemRolesAndRightsForm.java b/src/main/java/org/olat/admin/user/SystemRolesAndRightsForm.java index 6a737ff0655c76343ea4b7ba70ad61f450b7dadd..b98c4c92eb61e9644248be87274f8e727c7246c8 100644 --- a/src/main/java/org/olat/admin/user/SystemRolesAndRightsForm.java +++ b/src/main/java/org/olat/admin/user/SystemRolesAndRightsForm.java @@ -291,7 +291,7 @@ public class SystemRolesAndRightsForm extends FormBasicController { ); sysSep = uifactory.addSpacerElement("syssep", formLayout, false); if (iAmOlatAdmin || canGuestsByConfig) { - AnonymousRE.addActionListener(this, FormEvent.ONCLICK); + AnonymousRE.addActionListener(FormEvent.ONCLICK); } else { AnonymousRE.setVisible(false); sysSep.setVisible(false); diff --git a/src/main/java/org/olat/admin/user/UserCreateController.java b/src/main/java/org/olat/admin/user/UserCreateController.java index b8a9343d22cab22c17993e83c8dca09cbef43938..449edba5b128a7a216367d1f06935b2bf3a7e402 100644 --- a/src/main/java/org/olat/admin/user/UserCreateController.java +++ b/src/main/java/org/olat/admin/user/UserCreateController.java @@ -209,7 +209,7 @@ class NewUserForm extends FormBasicController { String[] authValues = {translate("new.form.auth.true")}; authCheckbox = uifactory.addCheckboxesHorizontal("new.form.auth", formLayout, authKeys, authValues, null); authCheckbox.select("xx", showPasswordFields); - authCheckbox.addActionListener(this, FormEvent.ONCLICK); + authCheckbox.addActionListener(FormEvent.ONCLICK); // if OLAT authentication is used, use the pwd below psw1TextElement = uifactory.addPasswordElement(PASSWORD_NEW1, "new.form.password.new1", 255, "", formLayout); diff --git a/src/main/java/org/olat/admin/user/UsermanagerUserSearchController.java b/src/main/java/org/olat/admin/user/UsermanagerUserSearchController.java index e8d2acc1c9aaccedf55831088ea9ea923ee8b142..3c83ba75db912976efe3e6ea864ead66d5e7a249 100644 --- a/src/main/java/org/olat/admin/user/UsermanagerUserSearchController.java +++ b/src/main/java/org/olat/admin/user/UsermanagerUserSearchController.java @@ -882,7 +882,7 @@ class UsermanagerUserSearchForm extends FormBasicController { // Don't use submit button, form should not be marked as dirty since this is // not a configuration form but only a search form (OLAT-5626) searchButton = uifactory.addFormLink("search", formLayout, Link.BUTTON); - searchButton.addActionListener(this, FormEvent.ONCLICK); + searchButton.addActionListener(FormEvent.ONCLICK); } diff --git a/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep00.java b/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep00.java index f844db44f78d0e2d67964565a195c34c3b2fe5a4..bc96aac5a04b612e77af261dce799abf29cee471 100644 --- a/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep00.java +++ b/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep00.java @@ -284,7 +284,7 @@ class UserBulkChangeStep00 extends BasicStep { if (canChangePwd.booleanValue() || isOLATAdmin) { checkbox = uifactory.addCheckboxesVertical("checkboxPWD", "form.name.pwd", innerFormLayout, new String[] { "changePWD" }, new String[] { "" }, null, 1); checkbox.select("changePWD", false); - checkbox.addActionListener(listener, FormEvent.ONCLICK); + checkbox.addActionListener(FormEvent.ONCLICK); formitem = uifactory.addTextElement(UserBulkChangeManager.PWD_IDENTIFYER, "password", 127, null, innerFormLayout); TextElement formEl = (TextElement) formitem; formEl.setDisplaySize(35); @@ -312,7 +312,7 @@ class UserBulkChangeStep00 extends BasicStep { } checkbox = uifactory.addCheckboxesVertical("checkboxLang", "form.name.language", innerFormLayout, new String[] { "changeLang" }, new String[] { "" }, null, 1); checkbox.select("changeLang", false); - checkbox.addActionListener(listener, FormEvent.ONCLICK); + checkbox.addActionListener(FormEvent.ONCLICK); formitem = uifactory.addDropdownSingleselect(UserBulkChangeManager.LANG_IDENTIFYER, innerFormLayout, languageKeys, languageValues, null); formitem.setLabel(null, null); targets = new HashSet<FormItem>(); @@ -335,7 +335,7 @@ class UserBulkChangeStep00 extends BasicStep { checkbox = uifactory.addCheckboxesVertical("checkbox" + i, "form.name." + userPropertyHandler.getName(), innerFormLayout, new String[] { "change" + userPropertyHandler.getName() }, new String[] { "" }, null, 1); checkbox.select("change" + userPropertyHandler.getName(), false); - checkbox.addActionListener(listener, FormEvent.ONCLICK); + checkbox.addActionListener(FormEvent.ONCLICK); formitem = userPropertyHandler.addFormItem(getLocale(), null, usageIdentifyer, isAdministrativeUser, innerFormLayout); formitem.setLabel(null, null); diff --git a/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep01.java b/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep01.java index 3c3e6480f90928120b0aa450d9f8e438f0d8b7fa..e1ed014e7f3b969626a0e4091cb0d5909c276048 100644 --- a/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep01.java +++ b/src/main/java/org/olat/admin/user/bulkChange/UserBulkChangeStep01.java @@ -194,7 +194,7 @@ class UserBulkChangeStep01 extends BasicStep { if (isAdmin || isUserManager || iAmOlatAdmin) { chkUserManager = uifactory.addCheckboxesVertical("Usermanager", "table.role.useradmin", innerFormLayout, new String[] { "Usermanager" }, new String[] { "" }, null, 1); chkUserManager.select("Usermanager", false); - chkUserManager.addActionListener(listener, FormEvent.ONCLICK); + chkUserManager.addActionListener(FormEvent.ONCLICK); setUserManager = uifactory.addDropdownSingleselect("setUserManager", null, innerFormLayout, addremove, addremoveTranslated, null); setUserManager.setVisible(false); @@ -208,7 +208,7 @@ class UserBulkChangeStep01 extends BasicStep { if (isAdmin || isGroupManager || iAmOlatAdmin) { chkGroupManager = uifactory.addCheckboxesVertical("Groupmanager", "table.role.groupadmin", innerFormLayout, new String[] { "Groupmanager" }, new String[] { "" }, null, 1); chkGroupManager.select("Groupmanager", false); - chkGroupManager.addActionListener(listener, FormEvent.ONCLICK); + chkGroupManager.addActionListener(FormEvent.ONCLICK); setGroupManager = uifactory.addDropdownSingleselect("setGroupManager", null, innerFormLayout, addremove, addremoveTranslated, null); setGroupManager.setVisible(false); @@ -222,7 +222,7 @@ class UserBulkChangeStep01 extends BasicStep { if (isAdmin || isAuthor || iAmOlatAdmin) { chkAuthor = uifactory.addCheckboxesVertical("Author", "table.role.author", innerFormLayout, new String[] { "Author" }, new String[] { "" }, null, 1); chkAuthor.select("Author", false); - chkAuthor.addActionListener(listener, FormEvent.ONCLICK); + chkAuthor.addActionListener(FormEvent.ONCLICK); setAuthor = uifactory.addDropdownSingleselect("setAuthor", null, innerFormLayout, addremove, addremoveTranslated, null); setAuthor.setVisible(false); @@ -239,7 +239,7 @@ class UserBulkChangeStep01 extends BasicStep { if (isAdmin || iAmOlatAdmin) { chkAdmin = uifactory.addCheckboxesVertical("Admin", "table.role.admin", innerFormLayout, new String[] { "Admin" }, new String[] { "" }, null, 1); chkAdmin.select("Admin", false); - chkAdmin.addActionListener(listener, FormEvent.ONCLICK); + chkAdmin.addActionListener(FormEvent.ONCLICK); setAdmin = uifactory.addDropdownSingleselect("setAdmin",null, innerFormLayout, addremove, addremoveTranslated, null); setAdmin.setVisible(false); @@ -253,7 +253,7 @@ class UserBulkChangeStep01 extends BasicStep { if (isAdmin || iAmOlatAdmin) { chkStatus = uifactory.addCheckboxesVertical("Status", "table.role.status", innerFormLayout, new String[] { "Status" }, new String[] { "" }, null, 1); chkStatus.select("Status", false); - chkStatus.addActionListener(listener, FormEvent.ONCLICK); + chkStatus.addActionListener(FormEvent.ONCLICK); // TODO: RH: pay attention: if status changes in Identity-statics this diff --git a/src/main/java/org/olat/admin/version/VersionSettingsForm.java b/src/main/java/org/olat/admin/version/VersionSettingsForm.java index 76b7a06257423a24299c89607410ac90d7a93029..f6819bc980891b516ef826f2097f98aeaf051add 100644 --- a/src/main/java/org/olat/admin/version/VersionSettingsForm.java +++ b/src/main/java/org/olat/admin/version/VersionSettingsForm.java @@ -75,7 +75,7 @@ public class VersionSettingsForm extends FormBasicController { setFormContextHelp(VersionSettingsForm.class.getPackage().getName(), "version.html", "help.hover.version"); numOfVersions = uifactory.addDropdownSingleselect("version.numOfVersions", formLayout, keys, values, null); - numOfVersions.addActionListener(this, FormEvent.ONCHANGE); + numOfVersions.addActionListener(FormEvent.ONCHANGE); Long maxNumber = getNumOfVersions(); if(maxNumber == null) { numOfVersions.select("0", true); diff --git a/src/main/java/org/olat/catalog/ui/CatalogAdminController.java b/src/main/java/org/olat/catalog/ui/CatalogAdminController.java index 0dc1f7d97e8a37288ba4af1137e1d2ece1ab9542..d78af50aab414885b0611ac4a62ba5bebe8fb3a6 100644 --- a/src/main/java/org/olat/catalog/ui/CatalogAdminController.java +++ b/src/main/java/org/olat/catalog/ui/CatalogAdminController.java @@ -65,15 +65,15 @@ public class CatalogAdminController extends FormBasicController { myCoursesEl = uifactory.addCheckboxesHorizontal("my.courses", "catalog.courses", serverCont, new String[]{"xx"}, new String[]{""}, null); myCoursesEl.select("xx", catalogModule.isMyCoursesEnabled()); - myCoursesEl.addActionListener(this, FormEvent.ONCLICK); + myCoursesEl.addActionListener(FormEvent.ONCLICK); siteEl = uifactory.addCheckboxesHorizontal("catalog.new", "catalog.new", serverCont, new String[]{"xx"}, new String[]{""}, null); siteEl.select("xx", catalogModule.isCatalogSiteEnabled()); - siteEl.addActionListener(this, FormEvent.ONCLICK); + siteEl.addActionListener(FormEvent.ONCLICK); repoEl = uifactory.addCheckboxesHorizontal("catalog.classic", "catalog.classic", serverCont, new String[]{"xx"}, new String[]{""}, null); repoEl.select("xx", catalogModule.isCatalogRepoEnabled()); - repoEl.addActionListener(this, FormEvent.ONCLICK); + repoEl.addActionListener(FormEvent.ONCLICK); } protected void doDispose() { diff --git a/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java b/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java index 5f1217346be3d1df423a77249ca6f209a91028f0..aca9c22bde17edaaf8ce401de105b98d73fbf88b 100644 --- a/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java +++ b/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java @@ -318,7 +318,7 @@ class ChoiceOfToolsForm extends FormBasicController { for (int i=0; i<availableTools.length; i++) { ms.select(""+i, cts.isToolEnabled(availableTools[i])); } - ms.addActionListener(listener, FormEvent.ONCLICK); + ms.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/commons/calendar/ui/KalendarEntryForm.java b/src/main/java/org/olat/commons/calendar/ui/KalendarEntryForm.java index 82213df79e5735e6154f6d76f5396b3a955eefbb..56b270789353f11f69d2f9302fe343fc18f5b25d 100644 --- a/src/main/java/org/olat/commons/calendar/ui/KalendarEntryForm.java +++ b/src/main/java/org/olat/commons/calendar/ui/KalendarEntryForm.java @@ -328,7 +328,7 @@ public class KalendarEntryForm extends FormBasicController { String currentRecur = CalendarUtils.getRecurrence(event.getRecurrenceRule()); boolean rk = currentRecur != null && !currentRecur.equals(""); chooseRecurrence.select(rk ? currentRecur:RECURRENCE_NONE, true); - chooseRecurrence.addActionListener(this, FormEvent.ONCHANGE); + chooseRecurrence.addActionListener(FormEvent.ONCHANGE); recurrenceEnd = uifactory.addDateChooser("recurrence", "cal.form.recurrence.end", null, formLayout); recurrenceEnd.setDisplaySize(21); diff --git a/src/main/java/org/olat/commons/file/filechooser/FileChooseCreateEditController.java b/src/main/java/org/olat/commons/file/filechooser/FileChooseCreateEditController.java index 6883795cb78a9d6fa8ab298c69477fa34d63f31e..c8f57e9617449c5279f4486d40c71cad076e5466 100644 --- a/src/main/java/org/olat/commons/file/filechooser/FileChooseCreateEditController.java +++ b/src/main/java/org/olat/commons/file/filechooser/FileChooseCreateEditController.java @@ -720,7 +720,7 @@ class AllowRelativeLinksForm extends FormBasicController { protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { allowRelativeLinks = uifactory.addCheckboxesVertical("allowRelativeLinks", "allowRelativeLinks", formLayout, new String[] {"xx"}, new String[] {null}, null, 1); allowRelativeLinks.select("xx", isOn); - allowRelativeLinks.addActionListener(this, FormEvent.ONCLICK); + allowRelativeLinks.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/core/commons/chiefcontrollers/LanguageChooserController.java b/src/main/java/org/olat/core/commons/chiefcontrollers/LanguageChooserController.java index f16825c424d363821b9f3295a76dc136735e1270..fe820671351d6270cb528854e04627cd8f3735b5 100644 --- a/src/main/java/org/olat/core/commons/chiefcontrollers/LanguageChooserController.java +++ b/src/main/java/org/olat/core/commons/chiefcontrollers/LanguageChooserController.java @@ -123,7 +123,7 @@ public class LanguageChooserController extends FormBasicController { // Build css classes for reference languages String[] langCssClasses = I18nManager.getInstance().createLanguageFlagsCssClasses(langKeys, "b_with_small_icon_left"); langs = uifactory.addDropdownSingleselect(mainForm.getFormId() + "_select", "select.language", "select.language", formLayout, langKeys, langValues, langCssClasses); - langs.addActionListener(this, FormEvent.ONCHANGE); + langs.addActionListener(FormEvent.ONCHANGE); langs.select(curlang, true); // Add to velocity for flag this.flc.contextPut("languageCode", curlang.toString()); diff --git a/src/main/java/org/olat/core/commons/contextHelp/ContextHelpTopNavController.java b/src/main/java/org/olat/core/commons/contextHelp/ContextHelpTopNavController.java index 8044ea8f2bcb4a6c64f732de0c0c59f6e6a521ab..b8b53f13b94a1024dc7b3ab6b8cf3938c2a47534 100644 --- a/src/main/java/org/olat/core/commons/contextHelp/ContextHelpTopNavController.java +++ b/src/main/java/org/olat/core/commons/contextHelp/ContextHelpTopNavController.java @@ -113,10 +113,10 @@ public class ContextHelpTopNavController extends FormBasicController { // Build css classes for reference languages String[] targetLangCssClasses = i18nMgr.createLanguageFlagsCssClasses(targetlangKeys, "b_with_small_icon_left"); langSelection = uifactory.addDropdownSingleselect("contexthelp.langSelection", formLayout, targetlangKeys, targetLangValues, targetLangCssClasses); - langSelection.addActionListener(this, FormEvent.ONCHANGE); + langSelection.addActionListener(FormEvent.ONCHANGE); // Preselect language from URL langSelection.select(getLocale().toString(), true); - this.flc.contextPut("lang", getLocale().toString()); + flc.contextPut("lang", getLocale().toString()); // Add window close link closeLink = FormUIFactory.getInstance().addFormLink("header.topnav.close", this.flc); } diff --git a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java index 2596973bfd89f9da17e5f4e99b52976aaf44181a..e2291654333a478b4e5d094c91319509b8257a09 100644 --- a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java +++ b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java @@ -240,11 +240,11 @@ public class HTMLEditorController extends FormBasicController { // // The buttons save = uifactory.addFormLink("savebuttontext", formLayout, Link.BUTTON); - save.addActionListener(this, FormEvent.ONCLICK); + save.addActionListener(FormEvent.ONCLICK); cancel = uifactory.addFormLink("cancel", formLayout, Link.BUTTON); - cancel.addActionListener(this, FormEvent.ONCLICK); + cancel.addActionListener(FormEvent.ONCLICK); saveClose = uifactory.addFormLink("saveandclosebuttontext", formLayout, Link.BUTTON); - saveClose.addActionListener(this, FormEvent.ONCLICK); + saveClose.addActionListener(FormEvent.ONCLICK); // // Add some file metadata VelocityContainer vc = (VelocityContainer) formLayout.getComponent(); diff --git a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorControllerWithoutFile.java b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorControllerWithoutFile.java index f9df7c2c39262726a8e547c155457714ae0cd942..b45d48cc7b9fb7f89206abf407a6413349bffadc 100644 --- a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorControllerWithoutFile.java +++ b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorControllerWithoutFile.java @@ -133,9 +133,9 @@ public class HTMLEditorControllerWithoutFile extends FormBasicController { // The buttons save = uifactory.addFormLink("savebuttontext", formLayout, Link.BUTTON); - save.addActionListener(this, FormEvent.ONCLICK); + save.addActionListener(FormEvent.ONCLICK); cancel = uifactory.addFormLink("cancel", formLayout, Link.BUTTON); - cancel.addActionListener(this, FormEvent.ONCLICK); + cancel.addActionListener(FormEvent.ONCLICK); saveClose = uifactory.addFormLink("saveandclosebuttontext", formLayout, Link.BUTTON); saveClose.setVisible(false); } diff --git a/src/main/java/org/olat/core/commons/modules/glossary/GlossaryFlexionController.java b/src/main/java/org/olat/core/commons/modules/glossary/GlossaryFlexionController.java index 30884d5896a8e9114c6c0ee0d2d7210e54d56477..e9b0fe89496be981090c60fc9871c86ec5cb2e68 100644 --- a/src/main/java/org/olat/core/commons/modules/glossary/GlossaryFlexionController.java +++ b/src/main/java/org/olat/core/commons/modules/glossary/GlossaryFlexionController.java @@ -197,7 +197,7 @@ public class GlossaryFlexionController extends FormBasicController { if (Arrays.asList(msKeys).contains(morphServicePresetIdent)){ selectMS.select(morphServicePresetIdent, true); } - selectMS.addActionListener(listener, FormEvent.ONCHANGE); + selectMS.addActionListener(FormEvent.ONCHANGE); flexButton = uifactory.addFormLink("flexions.get.button", formLayout, Link.BUTTON); } @@ -218,7 +218,7 @@ public class GlossaryFlexionController extends FormBasicController { } existingFlexions = uifactory.addCheckboxesVertical("existing.flexions.checkboxes", null, formLayout, flexionKeys, flexionValues, flexionCSS, 1); - existingFlexions.addActionListener(listener, FormEvent.ONCLICK); + existingFlexions.addActionListener(FormEvent.ONCLICK); for (String flexKey : existingKeys) { existingFlexions.select(flexKey, true); } diff --git a/src/main/java/org/olat/core/commons/services/notifications/ui/DateChooserController.java b/src/main/java/org/olat/core/commons/services/notifications/ui/DateChooserController.java index 3bb4139f7d0ea539f0bae8b6b337ae9ea22269fe..ee7a27a712f435b8b5d1b64689aadb62b266779f 100644 --- a/src/main/java/org/olat/core/commons/services/notifications/ui/DateChooserController.java +++ b/src/main/java/org/olat/core/commons/services/notifications/ui/DateChooserController.java @@ -83,10 +83,10 @@ public class DateChooserController extends FormBasicController { //FIXME: Can't use time format for now, only date format due to bug OLAT-4736 // dateChooser.setDateChooserTimeEnabled(true); dateChooser.setDate(initDate); - dateChooser.addActionListener(this, FormEvent.ONCHANGE); + dateChooser.addActionListener(FormEvent.ONCHANGE); typeSelection = uifactory.addDropdownSingleselect("news.type", "news.type", formLayout, typeKeys, typeValues, null); - typeSelection.addActionListener(this, FormEvent.ONCHANGE); + typeSelection.addActionListener(FormEvent.ONCHANGE); typeSelection.select("all", true); //link = uifactory.addFormLink("news.since.link", formLayout); diff --git a/src/main/java/org/olat/core/commons/services/webdav/ui/WebDAVAdminController.java b/src/main/java/org/olat/core/commons/services/webdav/ui/WebDAVAdminController.java index c026b097c156cd93ef2a8883f87040ed3bd2d9a7..9e2cbe1ec1d49a770845048b5c4e5435992c0b4e 100644 --- a/src/main/java/org/olat/core/commons/services/webdav/ui/WebDAVAdminController.java +++ b/src/main/java/org/olat/core/commons/services/webdav/ui/WebDAVAdminController.java @@ -58,16 +58,16 @@ public class WebDAVAdminController extends FormBasicController { String[] values = new String[] { getTranslator().translate("webdav.on") }; enableModuleEl = uifactory.addCheckboxesHorizontal("webdavModule", "webdav.module", formLayout, new String[]{"xx"}, values, null); enableModuleEl.select("xx", enabled); - enableModuleEl.addActionListener(this, FormEvent.ONCHANGE); + enableModuleEl.addActionListener(FormEvent.ONCHANGE); enableLinkEl = uifactory.addCheckboxesHorizontal("webdavLink", "webdav.link", formLayout, new String[]{"xx"}, values, null); enableLinkEl.select("xx", webDAVModule.isLinkEnabled()); - enableLinkEl.addActionListener(this, FormEvent.ONCHANGE); + enableLinkEl.addActionListener(FormEvent.ONCHANGE); enableLinkEl.setEnabled(enabled); enableDigestEl = uifactory.addCheckboxesHorizontal("webdavDigest", "webdav.digest", formLayout, new String[]{"xx"}, values, null); enableDigestEl.select("xx", webDAVModule.isDigestAuthenticationEnabled()); - enableDigestEl.addActionListener(this, FormEvent.ONCHANGE); + enableDigestEl.addActionListener(FormEvent.ONCHANGE); enableDigestEl.setEnabled(enabled); } diff --git a/src/main/java/org/olat/core/gui/components/AbstractComponent.java b/src/main/java/org/olat/core/gui/components/AbstractComponent.java index 60aafcd95e47034eee2c5be26f3481a546aee671..d5d4179d613d53374426246b159cbd966c9592ac 100644 --- a/src/main/java/org/olat/core/gui/components/AbstractComponent.java +++ b/src/main/java/org/olat/core/gui/components/AbstractComponent.java @@ -126,7 +126,7 @@ public abstract class AbstractComponent implements Component { this.name = name; this.translator = translator; - listeners = new ArrayList<ComponentEventListener>(2); + listeners = new ArrayList<ComponentEventListener>(1); } /** diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/FormItem.java b/src/main/java/org/olat/core/gui/components/form/flexible/FormItem.java index bd2382ed7f909e7c509453788692b5b7713cb955..c159bb8dd564e38e28fa5579c8670db52cd8874e 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/FormItem.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/FormItem.java @@ -33,7 +33,6 @@ import org.olat.core.gui.components.Container; import org.olat.core.gui.components.form.flexible.elements.FormLink; import org.olat.core.gui.components.form.flexible.impl.Form; import org.olat.core.gui.components.form.flexible.impl.FormItemImpl; -import org.olat.core.gui.control.Controller; import org.olat.core.gui.translator.Translator; import org.olat.core.util.ValidationStatus; @@ -433,15 +432,7 @@ public interface FormItem extends FormBaseComponentIdProvider { * @param listener * @param events */ - public void addActionListener(Controller listener, int events); - - /** - * - * @param event - * @return - */ - //not implemented - //public List getActionListenersFor(int event); + public void addActionListener(int events); /** * diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/FormUIFactory.java b/src/main/java/org/olat/core/gui/components/form/flexible/FormUIFactory.java index f3116853e6fbfa4eeff2b7b63f508913326fbb40..0669bb3b9276673cf8679ee45986eed184c89203 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/FormUIFactory.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/FormUIFactory.java @@ -461,7 +461,7 @@ public class FormUIFactory { public TextElement addInlineTextElement(String name, String value, FormItemContainer formLayout, FormBasicController listener) { TextElement ie = new TextElementImpl(null, name, value, TextElementImpl.HTML_INPUT_TYPE_TEXT, true); - ie.addActionListener(listener, FormEvent.ONCLICK); + ie.addActionListener(FormEvent.ONCLICK); if(listener != null){ formLayout.add(ie); } @@ -470,7 +470,7 @@ public class FormUIFactory { public IntegerElement addInlineIntegerElement(String name, int initVal, FormItemContainer formLayout, FormBasicController listener){ IntegerElement iie = new IntegerElementImpl(name, initVal, true); - iie.addActionListener(listener, FormEvent.ONCLICK); + iie.addActionListener(FormEvent.ONCLICK); if(listener != null){ formLayout.add(iie); } diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/FormItemImpl.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/FormItemImpl.java index bfe387bac0c4b52fb8ded39f0111f3da68b7171d..c4f88a1087538e014732d3242dca01fc4f31f19b 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/FormItemImpl.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/FormItemImpl.java @@ -39,7 +39,6 @@ import org.olat.core.gui.components.form.flexible.impl.components.SimpleExampleT import org.olat.core.gui.components.form.flexible.impl.components.SimpleFormErrorText; import org.olat.core.gui.components.form.flexible.impl.components.SimpleLabelText; import org.olat.core.gui.components.panel.Panel; -import org.olat.core.gui.control.Controller; import org.olat.core.gui.translator.Translator; import org.olat.core.helpers.Settings; import org.olat.core.logging.AssertException; @@ -464,34 +463,12 @@ public abstract class FormItemImpl implements FormItem, InlineElement { /** * @see org.olat.core.gui.components.form.flexible.FormItem#addActionListenerFor(org.olat.core.gui.control.Controller, int) */ - public void addActionListener(Controller listener, int action) { - /* - * for simplicity only one action and listener per item (at the moment) - */ + @Override + public void addActionListener(int action) { this.action = action; - //for (int i = 0; i < FormEvent.ON_DOTDOTDOT.length; i++) { - //if(action - FormEvent.ON_DOTDOTDOT[i] == 0){ - //String key = String.valueOf(FormEvent.ON_DOTDOTDOT[i]); - //if(actionListeners.containsKey(key)){ - //List listeners = (List)actionListeners.get(key); - //if(!listeners.contains(listener)){ - //listeners.add(listener); - //} - //}else{ - //String key = String.valueOf(this.action); - //List listeners = new ArrayList(1); - //actionListeners.put(key, listeners); - //} - //} - // - //action = action - FormEvent.ON_DOTDOTDOT[i]; - //} - } - - /*public List getActionListenersFor(int event){ - return (List)actionListeners.get(String.valueOf(event)); - }*/ + } + @Override public int getAction() { return action; } diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/TextElementImpl.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/TextElementImpl.java index d9c4ac9820e1333711efcbf6b7a3686f23787e02..82700a90b79741f93c73a84f38af2b56cd86e47f 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/TextElementImpl.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/TextElementImpl.java @@ -35,7 +35,6 @@ import org.olat.core.gui.components.form.flexible.FormBaseComponentIdProvider; import org.olat.core.gui.components.form.flexible.elements.InlineTextElement; import org.olat.core.gui.components.form.flexible.impl.FormEvent; import org.olat.core.gui.components.form.flexible.impl.FormJSHelper; -import org.olat.core.gui.control.Controller; import org.olat.core.gui.render.RenderResult; import org.olat.core.gui.render.Renderer; import org.olat.core.gui.render.RenderingState; @@ -337,8 +336,8 @@ public class TextElementImpl extends AbstractTextElement implements InlineTextEl * TODO: add an onkeypress listener which will post do background instead, this could then also be used for an autocomplete textfield */ @Override - public void addActionListener(Controller listener, int action) { - super.addActionListener(listener, action); + public void addActionListener(int action) { + super.addActionListener(action); if (action == FormEvent.ONCHANGE && Settings.isDebuging()) { log.warn("Do not use the onChange event in Textfields / TextAreas as this has often unwanted side effects. " + "As the onchange event is only tiggered when you click outside a field or navigate with the tab to the next element " + diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java index 6601a3ab9c2a313cafcc660f09bf716e91da6934..4ccce2465fabf23e5ba2ef634955fce5a6481d81 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java @@ -27,7 +27,6 @@ import org.olat.core.gui.components.form.flexible.elements.RichTextElement; import org.olat.core.gui.components.form.flexible.impl.Form; import org.olat.core.gui.components.form.flexible.impl.FormEvent; import org.olat.core.gui.components.form.flexible.impl.elements.AbstractTextElement; -import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Disposable; import org.olat.core.gui.control.WindowBackOffice; import org.olat.core.gui.control.winmgr.JSCommand; @@ -202,8 +201,8 @@ public class RichTextElementImpl extends AbstractTextElement implements * @see org.olat.core.gui.components.form.flexible.impl.FormItemImpl#addActionListener(org.olat.core.gui.control.Controller, int) */ @Override - public void addActionListener(Controller listener, int action) { - super.addActionListener(listener, action); + public void addActionListener(int action) { + super.addActionListener(action); if (action == FormEvent.ONCHANGE && Settings.isDebuging()) { log.warn("Do not use the onChange event in Textfields / TextAreas as this has often unwanted side effects. " + "As the onchange event is only tiggered when you click outside a field or navigate with the tab to the next element " + @@ -211,7 +210,4 @@ public class RichTextElementImpl extends AbstractTextElement implements "the submit button first the onchange event will be triggered and you have to click twice to submit the data. "); } } - - - -} +} \ No newline at end of file diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java index 8e09bb0daad9f0d02cc8d6a781a53feef587fdad..51451cc94973bb49ce39ada7ec02b223aaef0584 100644 --- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java +++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java @@ -234,7 +234,7 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle filterEl.setLabel(labelI18nKey, null); filterEl.showLabel(true); } - filterEl.addActionListener(null, FormEvent.ONCHANGE); + filterEl.addActionListener(FormEvent.ONCHANGE); filterEl.setKeysAndValues(keys, values, null); components.put("rFilter", filterEl); rootFormAvailable(filterEl); diff --git a/src/main/java/org/olat/core/gui/control/generic/iframe/DeliveryOptionsConfigurationController.java b/src/main/java/org/olat/core/gui/control/generic/iframe/DeliveryOptionsConfigurationController.java index d5a3821c59ff5cba5710ebd4be0230eaa69d5295..0dc8b0feb6ed9cead4eb15cd056b699413d5c1c8 100644 --- a/src/main/java/org/olat/core/gui/control/generic/iframe/DeliveryOptionsConfigurationController.java +++ b/src/main/java/org/olat/core/gui/control/generic/iframe/DeliveryOptionsConfigurationController.java @@ -149,7 +149,7 @@ public class DeliveryOptionsConfigurationController extends FormBasicController translate("inherit"), translate("custom") }; inheritEl = uifactory.addRadiosVertical("inherit.label", formLayout, inheritKeys, inheritValues); - inheritEl.addActionListener(this, FormEvent.ONCHANGE); + inheritEl.addActionListener(FormEvent.ONCHANGE); if(config != null && config.getInherit() != null && config.getInherit().booleanValue()) { inheritEl.select(inheritKeys[0], true); } else { @@ -166,7 +166,7 @@ public class DeliveryOptionsConfigurationController extends FormBasicController translate("mode.standard"), translate("mode.configured") }; standardModeEl = uifactory.addRadiosVertical("mode", formLayout, standardModeKeys, standardModeValues); - standardModeEl.addActionListener(this, FormEvent.ONCHANGE); + standardModeEl.addActionListener(FormEvent.ONCHANGE); uifactory.addSpacerElement("spacer.js", formLayout, false); @@ -174,7 +174,7 @@ public class DeliveryOptionsConfigurationController extends FormBasicController translate("option.js.none"), translate("option.js.jQuery"), translate("option.js.prototypejs") }; jsOptionEl = uifactory.addRadiosVertical("option.js", formLayout, jsKeys, jsValues); - jsOptionEl.addActionListener(this, FormEvent.ONCHANGE); + jsOptionEl.addActionListener(FormEvent.ONCHANGE); glossarEl = uifactory.addCheckboxesHorizontal("option.glossary", formLayout, new String[]{"on"}, new String[]{""}, null); diff --git a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigController.java b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigController.java index 086f8e147ba845b787affe63693baf9731f8c98c..362448626273d5b49086dffef05b13365d648f8a 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigController.java @@ -102,7 +102,7 @@ class I18nConfigController extends FormBasicController { String[] defaultLangCssClasses = i18nMgr.createLanguageFlagsCssClasses(defaultlangKeys, "b_with_small_icon_left"); defaultLangSelection = uifactory.addDropdownSingleselect("configuration.defaultLangSelection", formLayout, defaultlangKeys, defaultLangValues, defaultLangCssClasses); - defaultLangSelection.addActionListener(this, FormEvent.ONCHANGE); + defaultLangSelection.addActionListener(FormEvent.ONCHANGE); // Enable the current default language Locale defaultLocale = I18nModule.getDefaultLocale(); this.flc.contextPut("defaultLangKey", defaultLocale.toString()); @@ -131,7 +131,7 @@ class I18nConfigController extends FormBasicController { enabledLangSelection = uifactory.addCheckboxesVertical("configuration.enabledLangSelection", null, formLayout, availablelangKeys, availableValues, availableLangCssClasses, 2); enabledLangSelection.setEscapeHtml(false); - enabledLangSelection.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + enabledLangSelection.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 // Enable current enabled languages for (String langKey : I18nModule.getEnabledLanguageKeys()) { enabledLangSelection.select(langKey, true); diff --git a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubDeleteLangController.java b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubDeleteLangController.java index a1d36d9ec4b97b9cbf50173515a9ee9d69d94bc9..c07536051d7e3207110bbb694d98a6ac6edd5bdb 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubDeleteLangController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubDeleteLangController.java @@ -108,7 +108,7 @@ class I18nConfigSubDeleteLangController extends FormBasicController { String[] availableLangCssClasses = i18nMgr.createLanguageFlagsCssClasses(deletableKeys, "b_with_small_icon_left"); deleteLangSelection = uifactory.addCheckboxesVertical("configuration.deleteLangSelection", null, formLayout, deletableKeys, availableValues, availableLangCssClasses, 2); - deleteLangSelection.addActionListener(this, FormEvent.ONCLICK); + deleteLangSelection.addActionListener(FormEvent.ONCLICK); // Add cancel and submit in button group layout FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator()); formLayout.add(buttonGroupLayout); diff --git a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubExportLangController.java b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubExportLangController.java index 431c402036b02b2aabf8350b723ef18b61de1b4a..13d623436d75568c89e3f647fb616d9d8f6b9002 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubExportLangController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubExportLangController.java @@ -105,7 +105,7 @@ class I18nConfigSubExportLangController extends FormBasicController { String[] availableLangCssClasses = i18nMgr.createLanguageFlagsCssClasses(availableKeys, "b_with_small_icon_left"); exportLangSelection = uifactory.addCheckboxesVertical("configuration.exportLangSelection", null, formLayout, availableKeys, availableValues, availableLangCssClasses, 2); - exportLangSelection.addActionListener(this, FormEvent.ONCLICK); + exportLangSelection.addActionListener(FormEvent.ONCLICK); // Add cancel and submit in button group layout FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator()); formLayout.add(buttonGroupLayout); diff --git a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubImportLangController.java b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubImportLangController.java index 8c3f17cfbfbc5942fb57df684ecfe91b603f21ed..6bea4786f2b18118fa609113402dcbc06334834c 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubImportLangController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubImportLangController.java @@ -88,7 +88,7 @@ class I18nConfigSubImportLangController extends FormBasicController { mimeTypes.add("application/x-jar"); mimeTypes.add("application/x-java-jar"); importFile.limitToMimeType(mimeTypes, "configuration.management.package.import.file.error.type", null); - importFile.addActionListener(this, FormEvent.ONCHANGE); // trigger auto-upload + importFile.addActionListener(FormEvent.ONCHANGE); // trigger auto-upload // // Add checkboxes for the found languages - hide so far String[] langKeys = new String[]{}; diff --git a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubNewLangController.java b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubNewLangController.java index 21a7120d8ccb22f1038a86d5fff2f6aaf3315306..59a3f95402ae61bd4fcc97c88d80b80a4594e150 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubNewLangController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/I18nConfigSubNewLangController.java @@ -107,13 +107,13 @@ class I18nConfigSubNewLangController extends FormBasicController { newLanguage.setMandatory(true); newLanguage.setRegexMatchCheck("[a-z]{2}", "configuration.management.create.language.error"); newLanguage.setDisplaySize(2); - newLanguage.addActionListener(this, FormEvent.ONCHANGE); + newLanguage.addActionListener(FormEvent.ONCHANGE); // b) the country code newCountry = uifactory.addTextElement("configuration.management.create.country", "configuration.management.create.country", 2, "", formLayout); newCountry.setExampleKey("configuration.management.create.country.example", null); newCountry.setRegexMatchCheck("[A-Z]{0,2}", "configuration.management.create.country.error"); - newCountry.addActionListener(this, FormEvent.ONCHANGE); + newCountry.addActionListener(FormEvent.ONCHANGE); newCountry.setDisplaySize(2); // c) the variant, only available when country code is filled out newVariant = uifactory.addTextElement("configuration.management.create.variant", "configuration.management.create.variant", 50, "", diff --git a/src/main/java/org/olat/core/util/i18n/ui/TranslationToolI18nItemEditCrumbController.java b/src/main/java/org/olat/core/util/i18n/ui/TranslationToolI18nItemEditCrumbController.java index 8fa16a79e6305a04fb043daeb6626834c9cc1d56..db401f542ec00d0cc84aab70967f5e55f920d97a 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/TranslationToolI18nItemEditCrumbController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/TranslationToolI18nItemEditCrumbController.java @@ -179,10 +179,10 @@ public class TranslationToolI18nItemEditCrumbController extends CrumbFormBasicCo String[] bundlesListArray = ArrayHelper.toArray(bundlesList); String[] keysListArray = ArrayHelper.toArray(keysList); bundlesSelection = formFactory.addDropdownSingleselect("bundlesSelection", this.flc, bundlesListArray, bundlesListArray, null); - bundlesSelection.addActionListener(this, FormEvent.ONCHANGE); + bundlesSelection.addActionListener(FormEvent.ONCHANGE); bundlesSelection.select(currentItem.getBundleName(), true); keysSelection = formFactory.addDropdownSingleselect("keysSelection", this.flc, keysListArray, keysListArray, null); - keysSelection.addActionListener(this, FormEvent.ONCHANGE); + keysSelection.addActionListener(FormEvent.ONCHANGE); keysSelection.select(currentItem.getKey(), true); // Add reference box referenceArea = formFactory.addTextAreaElement("referenceArea", "edit.referenceArea", -1, 1, -1, true, null, this.flc); @@ -195,7 +195,7 @@ public class TranslationToolI18nItemEditCrumbController extends CrumbFormBasicCo compareSwitch = formFactory.addCheckboxesHorizontal("compareSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//i18nLabel set to null -> disabled label compareSwitch.select(KEYS_ENABLED, compareEnabledPrefs.booleanValue()); - compareSwitch.addActionListener(listener, FormEvent.ONCLICK); + compareSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(compareSwitch); this.flc.contextPut("compareSwitchEnabled", compareEnabledPrefs); // Add compare language selection @@ -220,7 +220,7 @@ public class TranslationToolI18nItemEditCrumbController extends CrumbFormBasicCo compareLangCssClasses); compareLangSelection.select(i18nMgr.getLocaleKey(compareLocale), true); this.flc.contextPut("compareLanguageKey", i18nMgr.getLocaleKey(compareLocale)); - compareLangSelection.addActionListener(this, FormEvent.ONCHANGE); + compareLangSelection.addActionListener(FormEvent.ONCHANGE); compareLangSelection.setEnabled(compareEnabledPrefs.booleanValue()); // Add target box this.flc.contextPut("targetLanguageKey", i18nMgr.getLocaleKey(currentItem.getLocale())); diff --git a/src/main/java/org/olat/core/util/i18n/ui/TranslationToolStartCrumbController.java b/src/main/java/org/olat/core/util/i18n/ui/TranslationToolStartCrumbController.java index 447f215190c140375415861b29e7b8cae4ef2a93..5fe0771afcce9fb024f567f65a9e088845a5692d 100644 --- a/src/main/java/org/olat/core/util/i18n/ui/TranslationToolStartCrumbController.java +++ b/src/main/java/org/olat/core/util/i18n/ui/TranslationToolStartCrumbController.java @@ -193,7 +193,7 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { referenceLangValues, referenceLangCssClasses); referenceLangSelection.select(referenceLocale.toString(), true); this.flc.contextPut("referenceLangKey", referenceLocale.toString()); - referenceLangSelection.addActionListener(this, FormEvent.ONCHANGE); + referenceLangSelection.addActionListener(FormEvent.ONCHANGE); // Add target languages without overlays Set<String> translatableKeys; if (customizingMode) { @@ -246,7 +246,7 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { } else { this.flc.contextPut("targetLangKey", targetLocale.toString()); } - targetLangSelection.addActionListener(this, FormEvent.ONCHANGE); + targetLangSelection.addActionListener(FormEvent.ONCHANGE); // Add progress bar as normal component (not a form element) int bundlesCount = i18nMgr.countBundles(null, true); progressBar = new ProgressBar("progressBar", 200, 0, 0, translate("start.progressBar.unitLabel", bundlesCount + "")); @@ -257,20 +257,20 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { String[] bundlesKeys, String[] bundlesValues) { // Add missing bundles selector missingBundlesSelection = formFactory.addDropdownSingleselect("missingBundlesSelection", this.flc, bundlesKeys, bundlesValues, null); - missingBundlesSelection.addActionListener(this, FormEvent.ONCHANGE); + missingBundlesSelection.addActionListener(FormEvent.ONCHANGE); missingBundlesSelection.select(ALL_BUNDLES_IDENTIFYER, true); // Add missing bundles children switch missingBundlesIncludeBundlesChildrenSwitch = formFactory.addCheckboxesHorizontal("missingBundlesIncludeBundlesChildrenSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null missingBundlesIncludeBundlesChildrenSwitch.select(KEYS_ENABLED, true); - missingBundlesIncludeBundlesChildrenSwitch.addActionListener(listener, FormEvent.ONCLICK); + missingBundlesIncludeBundlesChildrenSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(missingBundlesIncludeBundlesChildrenSwitch); missingBundlesIncludeBundlesChildrenSwitch.setEnabled(false); // Add priority sort switch missingBundlesPrioritySortSwitch = formFactory.addCheckboxesHorizontal("missingBundlesPrioritySortSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null missingBundlesPrioritySortSwitch.select(KEYS_ENABLED, true); - missingBundlesPrioritySortSwitch.addActionListener(listener, FormEvent.ONCLICK); + missingBundlesPrioritySortSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(missingBundlesPrioritySortSwitch); // Add button to trigger missing keys search missingListButton = new FormLinkImpl("missingListButton", "missingListButton", "generic.listButton", Link.BUTTON); @@ -283,20 +283,20 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { String[] bundlesKeys, String[] bundlesValues) { // Add existing bundles selector existingBundlesSelection = formFactory.addDropdownSingleselect("existingBundlesSelection", this.flc, bundlesKeys, bundlesValues, null); - existingBundlesSelection.addActionListener(this, FormEvent.ONCHANGE); + existingBundlesSelection.addActionListener(FormEvent.ONCHANGE); existingBundlesSelection.select(ALL_BUNDLES_IDENTIFYER, true); // Add existing bundles children switch existingBundlesIncludeBundlesChildrenSwitch = formFactory.addCheckboxesHorizontal("existingBundlesIncludeBundlesChildrenSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null existingBundlesIncludeBundlesChildrenSwitch.select(KEYS_ENABLED, true); - existingBundlesIncludeBundlesChildrenSwitch.addActionListener(listener, FormEvent.ONCLICK); + existingBundlesIncludeBundlesChildrenSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(existingBundlesIncludeBundlesChildrenSwitch); existingBundlesIncludeBundlesChildrenSwitch.setEnabled(false); // Add priority sort switch existingBundlesPrioritySortSwitch = formFactory.addCheckboxesHorizontal("existingBundlesPrioritySortSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null existingBundlesPrioritySortSwitch.select(KEYS_ENABLED, true); - existingBundlesPrioritySortSwitch.addActionListener(listener, FormEvent.ONCLICK); + existingBundlesPrioritySortSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(existingBundlesPrioritySortSwitch); // Add button to trigger existing keys search existingListButton = new FormLinkImpl("existingListButton", "existingListButton", "generic.listButton", Link.BUTTON); @@ -309,20 +309,20 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { String[] bundlesKeys, String[] bundlesValues) { // Add all bundles selector allBundlesSelection = formFactory.addDropdownSingleselect("allBundlesSelection", this.flc, bundlesKeys, bundlesValues, null); - allBundlesSelection.addActionListener(this, FormEvent.ONCHANGE); + allBundlesSelection.addActionListener(FormEvent.ONCHANGE); allBundlesSelection.select(ALL_BUNDLES_IDENTIFYER, true); // Add all bundles children switch allBundlesIncludeBundlesChildrenSwitch = formFactory.addCheckboxesHorizontal("allBundlesIncludeBundlesChildrenSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null allBundlesIncludeBundlesChildrenSwitch.select(KEYS_ENABLED, true); - allBundlesIncludeBundlesChildrenSwitch.addActionListener(listener, FormEvent.ONCLICK); + allBundlesIncludeBundlesChildrenSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(allBundlesIncludeBundlesChildrenSwitch); allBundlesIncludeBundlesChildrenSwitch.setEnabled(false); // Add priority sort switch allBundlesPrioritySortSwitch = formFactory.addCheckboxesHorizontal("allBundlesPrioritySortSwitch", null, this.flc, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null);//disabled label by setting i18nLabel to null allBundlesPrioritySortSwitch.select(KEYS_ENABLED, true); - allBundlesPrioritySortSwitch.addActionListener(listener, FormEvent.ONCLICK); + allBundlesPrioritySortSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(allBundlesPrioritySortSwitch); // Add button to trigger all keys search allListButton = new FormLinkImpl("allListButton", "allListButton", "generic.listButton", Link.BUTTON); @@ -359,19 +359,19 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { searchBundlesSelection = formFactory.addDropdownSingleselect("searchBundlesSelection", searchLayoutContainer, bundlesKeys, bundlesValues, null); searchBundlesSelection.setLabel("generic.limit.bundles", null); - searchBundlesSelection.addActionListener(this, FormEvent.ONCHANGE); + searchBundlesSelection.addActionListener(FormEvent.ONCHANGE); searchBundlesSelection.select(ALL_BUNDLES_IDENTIFYER, true); // Add search bundles children switch searchBundlesIncludeBundlesChildrenSwitch = formFactory.addCheckboxesHorizontal("searchBundlesIncludeBundlesChildrenSwitch", "generic.limit.bundles.includeChildren", searchLayoutContainer, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null); searchBundlesIncludeBundlesChildrenSwitch.select(KEYS_ENABLED, true); - searchBundlesIncludeBundlesChildrenSwitch.addActionListener(listener, FormEvent.ONCLICK); + searchBundlesIncludeBundlesChildrenSwitch.addActionListener(FormEvent.ONCLICK); searchBundlesIncludeBundlesChildrenSwitch.setEnabled(false); // Add priority sort switch searchBundlesPrioritySortSwitch = formFactory.addCheckboxesHorizontal("searchBundlesPrioritySortSwitch", "generic.sort.by.priority", searchLayoutContainer, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY }, null); searchBundlesPrioritySortSwitch.select(KEYS_ENABLED, true); - searchBundlesPrioritySortSwitch.addActionListener(listener, FormEvent.ONCLICK); + searchBundlesPrioritySortSwitch.addActionListener(FormEvent.ONCLICK); formLayout.add(searchBundlesPrioritySortSwitch); // Add button to trigger search FormItemContainer searchButtonLayoutContainer = (FormItemContainer) FormLayoutContainer.createHorizontalFormLayout( @@ -644,12 +644,11 @@ class TranslationToolStartCrumbController extends CrumbFormBasicController { * org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest * , org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event) */ + @Override public void event(UserRequest ureq, Controller source, Event event) { if (event instanceof I18nItemChangedEvent) { - I18nItemChangedEvent itemChangedEvent = (I18nItemChangedEvent) event; // don't update view directly, wait until view is activated again viewIsDirty = true; - } else if (event == BreadCrumbController.CRUMB_VIEW_ACTIVATED) { // update view if (viewIsDirty) { diff --git a/src/main/java/org/olat/core/util/mail/MailTemplateForm.java b/src/main/java/org/olat/core/util/mail/MailTemplateForm.java index 96298ad9fa76bbfdc7bbc968d9a8f3f48d113686..d05316f239c976871719114c7ff7e1afa155f811 100644 --- a/src/main/java/org/olat/core/util/mail/MailTemplateForm.java +++ b/src/main/java/org/olat/core/util/mail/MailTemplateForm.java @@ -134,7 +134,7 @@ public class MailTemplateForm extends FormBasicController { protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { if(!mandatoryEmail) { sendMail = uifactory.addCheckboxesVertical("sendmail", "", formLayout, new String[]{"xx"}, new String[]{translate("mailtemplateform.sendMailSwitchElem")}, null, 1); - sendMail.addActionListener(listener, FormEvent.ONCLICK); + sendMail.addActionListener(FormEvent.ONCLICK); } subjectElem = uifactory.addTextElement("subjectElem", "mailtemplateform.subject", 128, template.getSubjectTemplate(), formLayout); diff --git a/src/main/java/org/olat/core/util/mail/ui/MailSettingsAdminController.java b/src/main/java/org/olat/core/util/mail/ui/MailSettingsAdminController.java index fdf2863ae6de57f3872041e82c019c873dc62cf0..843bdcd348fa2d8f5feefadcc19c5250661e81b8 100644 --- a/src/main/java/org/olat/core/util/mail/ui/MailSettingsAdminController.java +++ b/src/main/java/org/olat/core/util/mail/ui/MailSettingsAdminController.java @@ -70,7 +70,7 @@ public class MailSettingsAdminController extends FormBasicController { boolean internEnabled = isEnabled(); enabled = uifactory.addCheckboxesHorizontal("mail.admin.intern.enabled", formLayout, keys, values, null); enabled.select(keys[0], internEnabled); - enabled.addActionListener(this, FormEvent.ONCHANGE); + enabled.addActionListener(FormEvent.ONCHANGE); boolean realMailSetting = isUserDefaultSetting(); userSettingValues = new String[] { diff --git a/src/main/java/org/olat/course/assessment/bulk/ScheduleStepForm.java b/src/main/java/org/olat/course/assessment/bulk/ScheduleStepForm.java index 1ae9135c47ca66f661a9f36c1ceba7fa78784b32..e03ff6402bf688f67762420ff76caf5f7ea9f13b 100644 --- a/src/main/java/org/olat/course/assessment/bulk/ScheduleStepForm.java +++ b/src/main/java/org/olat/course/assessment/bulk/ScheduleStepForm.java @@ -65,7 +65,7 @@ public class ScheduleStepForm extends StepFormBasicController { translate("schedule.immediately"), translate("schedule.delayed") }; scheduleTypeEl = uifactory.addRadiosVertical("schedule.type", formLayout, typeKeys, typeValues); - scheduleTypeEl.addActionListener(this, FormEvent.ONCHANGE); + scheduleTypeEl.addActionListener(FormEvent.ONCHANGE); boolean delayed; Date scheduleDate; diff --git a/src/main/java/org/olat/course/condition/AttributeEasyRowAdderController.java b/src/main/java/org/olat/course/condition/AttributeEasyRowAdderController.java index f3bf8c061038f7778d822bbe4f2581c2aef6399c..93b0d41494aa79384c2b96af5c4cc4fb6fc9267b 100644 --- a/src/main/java/org/olat/course/condition/AttributeEasyRowAdderController.java +++ b/src/main/java/org/olat/course/condition/AttributeEasyRowAdderController.java @@ -390,7 +390,7 @@ public class AttributeEasyRowAdderController extends FormBasicController { // use this sorted keys-values final SingleSelection attribute = uifactory.addDropdownSingleselect(PRE_ATTRIBUTE + rowCreationCounter, null, flc, attrKeys, guiTranslatedAttKeys, null); attribute.setUserObject(Integer.valueOf(rowPos)); - attribute.addActionListener(this, FormEvent.ONCHANGE); + attribute.addActionListener(FormEvent.ONCHANGE); columnAttribute.add(rowPos, attribute.getName()); // 2b) Operator selector diff --git a/src/main/java/org/olat/course/condition/ConditionConfigEasyController.java b/src/main/java/org/olat/course/condition/ConditionConfigEasyController.java index 51d35da8fb0ddf8031e47bc2427661c733551556..c3dfb7ea5736777c8f411f90a8f2c2d7dd5a6dc1 100644 --- a/src/main/java/org/olat/course/condition/ConditionConfigEasyController.java +++ b/src/main/java/org/olat/course/condition/ConditionConfigEasyController.java @@ -741,7 +741,7 @@ public class ConditionConfigEasyController extends FormBasicController implement attributeSwitch = uifactory.addCheckboxesVertical("attributeSwitch", "form.easy.attributeSwitch", formLayout, new String[] { "ison" }, new String[] { "" }, null, 1); attributeSwitch.select("ison", validatedCondition.getAttributeConditions()!=null); // register for on click event to hide/disable other elements - attributeSwitch.addActionListener(listener, FormEvent.ONCLICK); + attributeSwitch.addActionListener(FormEvent.ONCLICK); // rules are later added // add attribute connector: AND or OR @@ -1083,7 +1083,7 @@ public class ConditionConfigEasyController extends FormBasicController implement coachExclusive.select("ison", coachesAndAdminsInitValue); // register for on click event to hide/disable other elements - coachExclusive.addActionListener(listener, FormEvent.ONCLICK); + coachExclusive.addActionListener(FormEvent.ONCLICK); // rules are later added } @@ -1147,7 +1147,7 @@ public class ConditionConfigEasyController extends FormBasicController implement } else { dateSwitch.select("ison", false); } - dateSwitch.addActionListener(listener, FormEvent.ONCLICK); + dateSwitch.addActionListener(FormEvent.ONCLICK); } /** @@ -1171,7 +1171,7 @@ public class ConditionConfigEasyController extends FormBasicController implement } else { groupSwitch.select("ison", false); } - groupSwitch.addActionListener(listener, FormEvent.ONCLICK); + groupSwitch.addActionListener(FormEvent.ONCLICK); //groups groupChooseSubContainer = FormLayoutContainer.createHorizontalFormLayout("groupChooseSubContainer", getTranslator()); @@ -1214,7 +1214,7 @@ public class ConditionConfigEasyController extends FormBasicController implement int cutInitValue = 0; assessmentSwitch = uifactory.addCheckboxesHorizontal("assessmentSwitch", null, formLayout, new String[] { "ison" }, new String[] { translate("form.easy.assessmentSwitch") }, null); - assessmentSwitch.addActionListener(listener, FormEvent.ONCLICK); + assessmentSwitch.addActionListener(FormEvent.ONCLICK); boolean selectedNodeIsInList = false; @@ -1276,7 +1276,7 @@ public class ConditionConfigEasyController extends FormBasicController implement } }; assessmentTypeSwitch.setLabel("form.easy.assessmentSwitch.type", null); - assessmentTypeSwitch.addActionListener(listener, FormEvent.ONCLICK); + assessmentTypeSwitch.addActionListener(FormEvent.ONCLICK); if (nodePassedInitVal != null) { // has a node configured diff --git a/src/main/java/org/olat/course/condition/additionalconditions/PasswordConditionEditController.java b/src/main/java/org/olat/course/condition/additionalconditions/PasswordConditionEditController.java index a5263b9602424e6f3180fcd2d3578b12e50a3fee..3046adae1ff0ba6712f62efbd9cbd4ddf35e657c 100644 --- a/src/main/java/org/olat/course/condition/additionalconditions/PasswordConditionEditController.java +++ b/src/main/java/org/olat/course/condition/additionalconditions/PasswordConditionEditController.java @@ -57,7 +57,7 @@ public class PasswordConditionEditController extends FormBasicController { @Override protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { passwordSwitch = uifactory.addCheckboxesHorizontal("passwordSwitch", "", formLayout, new String[]{"ison"}, new String[]{translate("password.field")}, new String[]{""}); - passwordSwitch.addActionListener(this, FormEvent.ONCHANGE); + passwordSwitch.addActionListener(FormEvent.ONCHANGE); passwordField = uifactory.addTextElement("passwordField", "password.field", 30, "", formLayout); passwordField.setExampleKey("password.example", null); diff --git a/src/main/java/org/olat/course/config/ui/courselayout/CourseLayoutGeneratorController.java b/src/main/java/org/olat/course/config/ui/courselayout/CourseLayoutGeneratorController.java index fe9776e482626cd727f7b924a1d4d27e9e89aca2..92bc74a60f6a47fb611c87df269cfee6de959dfa 100644 --- a/src/main/java/org/olat/course/config/ui/courselayout/CourseLayoutGeneratorController.java +++ b/src/main/java/org/olat/course/config/ui/courselayout/CourseLayoutGeneratorController.java @@ -178,7 +178,7 @@ public class CourseLayoutGeneratorController extends FormBasicController { String[] theCssClasses = ArrayHelper.toArray(csss); styleSel = uifactory.addDropdownSingleselect("course.layout.selector", formLayout, theKeys, theValues, theCssClasses); - styleSel.addActionListener(this, FormEvent.ONCHANGE); + styleSel.addActionListener(FormEvent.ONCHANGE); styleSel.setEnabled(editable); if (keys.contains(actualCSSSettings)){ styleSel.select(actualCSSSettings, true); @@ -199,7 +199,7 @@ public class CourseLayoutGeneratorController extends FormBasicController { // offer upload for 2nd logo if(editable) { logoUpl = uifactory.addFileElement("upload.second.logo", formLayout); - logoUpl.addActionListener(this, FormEvent.ONCHANGE); + logoUpl.addActionListener(FormEvent.ONCHANGE); Set<String> mimeTypes = new HashSet<String>(); mimeTypes.add("image/*"); logoUpl.limitToMimeType(mimeTypes, "logo.file.type.error", null); @@ -430,7 +430,7 @@ public class CourseLayoutGeneratorController extends FormBasicController { for (AbstractLayoutAttribute attrib : attributes) { String compName = elementType + ELEMENT_ATTRIBUTE_DELIM + attrib.getLayoutAttributeTypeName(); FormItem fi = attrib.getFormItem(compName, styleFlc); - fi.addActionListener(this, FormEvent.ONCHANGE); + fi.addActionListener(FormEvent.ONCHANGE); elAttribGui.put(attrib.getLayoutAttributeTypeName(), fi); } guiWrapper.put(elementType, elAttribGui); diff --git a/src/main/java/org/olat/course/config/ui/courselayout/attribs/ColorLA.java b/src/main/java/org/olat/course/config/ui/courselayout/attribs/ColorLA.java index e15b98550682bfb4adfaa8d51236785e0562af18..de2b5276da172d2d270b496eb722065e843cd23d 100644 --- a/src/main/java/org/olat/course/config/ui/courselayout/attribs/ColorLA.java +++ b/src/main/java/org/olat/course/config/ui/courselayout/attribs/ColorLA.java @@ -27,7 +27,6 @@ import org.olat.core.gui.components.form.flexible.elements.SingleSelection; import org.olat.core.gui.components.form.flexible.elements.TextElement; import org.olat.core.gui.components.form.flexible.impl.FormEvent; import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer; -import org.olat.core.gui.control.Controller; /** * @@ -117,7 +116,7 @@ public class ColorLA extends AbstractLayoutAttribute { FormLayoutContainer colorFLC = FormLayoutContainer.createVerticalFormLayout(compName, formLayout.getTranslator()); formLayout.add(compName, colorFLC); FormItem dropDown = super.getFormItem(compName + "sel", formLayout); - dropDown.addActionListener((Controller) formLayout.getUserObject(), FormEvent.ONCHANGE); + dropDown.addActionListener(FormEvent.ONCHANGE); colorFLC.add(dropDown); String inputValue = ""; diff --git a/src/main/java/org/olat/course/editor/MultiSPController.java b/src/main/java/org/olat/course/editor/MultiSPController.java index 859b3b22694522046b9c5b587c2d0fb3267cba40..72e75c7f5adb7285964310b02566f6f530e61cde 100644 --- a/src/main/java/org/olat/course/editor/MultiSPController.java +++ b/src/main/java/org/olat/course/editor/MultiSPController.java @@ -135,7 +135,7 @@ public class MultiSPController extends FormBasicController { nodeSelection.setLabel("multi.sps.file", null); nodeSelection.setUserObject(node); - nodeSelection.addActionListener(this, FormEvent.ONCLICK); + nodeSelection.addActionListener(FormEvent.ONCLICK); nodeSelections.add(nodeSelection); identToSelectionMap.put(node.getId(), nodeSelection); layoutcont.add(nodeSelection.getComponent().getComponentName(), nodeSelection); diff --git a/src/main/java/org/olat/course/editor/PublishStep00.java b/src/main/java/org/olat/course/editor/PublishStep00.java index c8ecae1d353cae8ae2f6d35c231307307049cec8..8432dc83d5b987bb7c74081ab4137afef6affcc1 100644 --- a/src/main/java/org/olat/course/editor/PublishStep00.java +++ b/src/main/java/org/olat/course/editor/PublishStep00.java @@ -290,10 +290,10 @@ class PublishStep00 extends BasicStep { multiSelectTree.selectAll(); selectAllLink = uifactory.addFormLink("checkall", fic); selectAllLink.setElementCssClass("o_sel_course_publish_selectall_cbb"); - selectAllLink.addActionListener(this, FormEvent.ONCLICK); + selectAllLink.addActionListener(FormEvent.ONCLICK); uncheckallLink = uifactory.addFormLink("uncheckall", fic); uncheckallLink.setElementCssClass("o_sel_course_publish_deselectall_cbb"); - uncheckallLink.addActionListener(this, FormEvent.ONCLICK); + uncheckallLink.addActionListener(FormEvent.ONCLICK); } else { // set message container - telling nothing to publish. formLayout.add(FormLayoutContainer.createCustomFormLayout("nothingtopublish", getTranslator(), this.velocity_root diff --git a/src/main/java/org/olat/course/editor/PublishStepCatalog.java b/src/main/java/org/olat/course/editor/PublishStepCatalog.java index a6e4da430304be50a331d821487951372abe869f..70bdcf5d77f83ca176e93bb3d528af8f1f290658 100644 --- a/src/main/java/org/olat/course/editor/PublishStepCatalog.java +++ b/src/main/java/org/olat/course/editor/PublishStepCatalog.java @@ -153,7 +153,7 @@ class PublishStepCatalog extends BasicStep { translate("no") }; catalogBox = uifactory.addDropdownSingleselect("catalogBox", "publish.catalog.box", fc, keys, values, null); - catalogBox.addActionListener(this, FormEvent.ONCHANGE); + catalogBox.addActionListener(FormEvent.ONCHANGE); if(!StringHelper.containsNonWhitespace(value)) { value = "yes"; } diff --git a/src/main/java/org/olat/course/member/OriginFilterController.java b/src/main/java/org/olat/course/member/OriginFilterController.java index 59aea79b764d2d6a98151e6e595281d2d2ebfc67..dbdd5bcb60973b5399ffbe5f24f11c75ca5a5fe4 100644 --- a/src/main/java/org/olat/course/member/OriginFilterController.java +++ b/src/main/java/org/olat/course/member/OriginFilterController.java @@ -53,7 +53,7 @@ public class OriginFilterController extends FormBasicController { } originEl = uifactory.addRadiosHorizontal("openBg", "search.origin.alt", formLayout, originKeys, openValues); originEl.select("all", true); - originEl.addActionListener(this, FormEvent.ONCHANGE); + originEl.addActionListener(FormEvent.ONCHANGE); } @Override diff --git a/src/main/java/org/olat/course/nodes/basiclti/LTIConfigForm.java b/src/main/java/org/olat/course/nodes/basiclti/LTIConfigForm.java index 214591365cab9679117e1e26d15309ea2588ee6a..3e3c027b5571ce25c59076d5bd448719a7cffabd 100644 --- a/src/main/java/org/olat/course/nodes/basiclti/LTIConfigForm.java +++ b/src/main/java/org/olat/course/nodes/basiclti/LTIConfigForm.java @@ -282,7 +282,7 @@ public class LTIConfigForm extends FormBasicController { String[] assessableKeys = new String[]{ "on" }; String[] assessableValues = new String[]{ "" }; isAssessableEl = uifactory.addCheckboxesHorizontal("isassessable", "assessable.label", formLayout, assessableKeys, assessableValues, null); - isAssessableEl.addActionListener(this, FormEvent.ONCHANGE); + isAssessableEl.addActionListener(FormEvent.ONCHANGE); if(isAssessable) { isAssessableEl.select("on", true); } @@ -370,7 +370,7 @@ public class LTIConfigForm extends FormBasicController { SingleSelection typeEl = uifactory.addDropdownSingleselect("typ_" + guid, customParamLayout, customTypeKeys, customTypeValues, null); typeEl.setUserObject(pair); - typeEl.addActionListener(this, FormEvent.ONCHANGE); + typeEl.addActionListener(FormEvent.ONCHANGE); pair.setCustomType(typeEl); boolean userprops = value != null && value.startsWith(LTIManager.USER_PROPS_PREFIX); diff --git a/src/main/java/org/olat/course/nodes/cal/CalEditController.java b/src/main/java/org/olat/course/nodes/cal/CalEditController.java index 9594d044854b3bf131a73871cb4666a2815c58da..963a12ce5903def583829ebd0f41e97753c5d309 100644 --- a/src/main/java/org/olat/course/nodes/cal/CalEditController.java +++ b/src/main/java/org/olat/course/nodes/cal/CalEditController.java @@ -256,7 +256,7 @@ public class CalEditController extends ActivateableTabbableDefaultController imp autoDateEl.select(autoDate ? keys[0] : keys[1], autoDate); autoDateEl.setLabel("pane.tab.start_date", null); - autoDateEl.addActionListener(this, FormEvent.ONCLICK); + autoDateEl.addActionListener(FormEvent.ONCLICK); Date startDate = getStartDate(config); Date selectedDate = startDate == null ? new Date() : startDate; diff --git a/src/main/java/org/olat/course/nodes/cl/ui/AssessedIdentityCheckListController.java b/src/main/java/org/olat/course/nodes/cl/ui/AssessedIdentityCheckListController.java index 85d6b213ebbaa417cb3538d9768c00455c6f15d3..5bf0163aa422566f46b2060ac6578aba52c05501 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/AssessedIdentityCheckListController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/AssessedIdentityCheckListController.java @@ -117,7 +117,7 @@ public class AssessedIdentityCheckListController extends FormBasicController { boxEl.setEnabled(!readOnly); boxEl.setLabel(checkbox.getTitle(), null, false); boxEl.showLabel(true); - boxEl.addActionListener(this, FormEvent.ONCHANGE); + boxEl.addActionListener(FormEvent.ONCHANGE); String pointId = "point_" + checkbox.getCheckboxId(); String points = AssessmentHelper.getRoundedScore(checkbox.getPoints()); diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java index 00a3f713669d6cad649cac190fc7f7f86c4b588f..8d46d16907c1f5ff2acc77c720fd449c77796fad 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java @@ -80,7 +80,7 @@ public class CheckListConfigurationController extends FormBasicController { Date dueDate = (Date)config.get(CheckListCourseNode.CONFIG_KEY_DUE_DATE); String[] theValues = new String[] { "" }; dueDateEl = uifactory.addCheckboxesHorizontal("duedate", "config.due.date.on", formLayout, onKeys, theValues, null); - dueDateEl.addActionListener(this, FormEvent.ONCHANGE); + dueDateEl.addActionListener(FormEvent.ONCHANGE); if(dueDateBool != null && dueDateBool.booleanValue()) { dueDateEl.select(onKeys[0], true); } diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListRunController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListRunController.java index cdcf588a447f8b5d647e57a73e51334e0b46f362..2270959a98396558c1a9d8269e92a589ea5a7cbb 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListRunController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListRunController.java @@ -151,7 +151,7 @@ public class CheckListRunController extends FormBasicController implements Contr MultipleSelectionElement el = uifactory .addCheckboxesHorizontal(boxId, null, formLayout, onKeys, values, null); el.setEnabled(canCheck && !readOnly); - el.addActionListener(this, FormEvent.ONCHANGE); + el.addActionListener(FormEvent.ONCHANGE); FormLink downloadLink = null; if(StringHelper.containsNonWhitespace(checkbox.getFilename())) { diff --git a/src/main/java/org/olat/course/nodes/co/COConfigForm.java b/src/main/java/org/olat/course/nodes/co/COConfigForm.java index 50a2e368a4a730b851371e28c0c5477592056709..9b46c483f6c7d189814d2b537a63b38876ce0d43 100644 --- a/src/main/java/org/olat/course/nodes/co/COConfigForm.java +++ b/src/main/java/org/olat/course/nodes/co/COConfigForm.java @@ -423,7 +423,7 @@ public class COConfigForm extends FormBasicController { setFormContextHelp("org.olat.course.nodes.co","ced-co.html","help.hover.co"); wantGroup = uifactory.addCheckboxesVertical("wantGroup", "message.want.group", formLayout, new String[]{"xx"},new String[]{null} , null, 1); - wantGroup.addActionListener(this, FormEvent.ONCLICK); + wantGroup.addActionListener(FormEvent.ONCLICK); coaches = uifactory.addCheckboxesVertical("coaches", "form.message.chckbx.coaches", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); coaches.select("xx", config.getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOCOACHES)); @@ -493,7 +493,7 @@ public class COConfigForm extends FormBasicController { s2 = uifactory.addSpacerElement("s2", formLayout, false); wantEmail = uifactory.addCheckboxesVertical("wantEmail", "message.want.email", formLayout, new String[]{"xx"},new String[]{null} , null, 1); - wantEmail.addActionListener(this, FormEvent.ONCLICK); + wantEmail.addActionListener(FormEvent.ONCLICK); //recipients eList = (List<String>) config.get(COEditController.CONFIG_KEY_EMAILTOADRESSES); diff --git a/src/main/java/org/olat/course/nodes/dialog/DialogConfigForm.java b/src/main/java/org/olat/course/nodes/dialog/DialogConfigForm.java index 5cf391db171d997ee0f365b43a9c4f87e6f29e52..c13e66b2927ea1844fd9c962ea9b97a915574a84 100644 --- a/src/main/java/org/olat/course/nodes/dialog/DialogConfigForm.java +++ b/src/main/java/org/olat/course/nodes/dialog/DialogConfigForm.java @@ -109,7 +109,7 @@ public class DialogConfigForm extends FormBasicController { String selectConfig = (String) config.get(DialogConfigForm.DIALOG_CONFIG_INTEGRATION); select.select ("xx", selectConfig == CONFIG_INTEGRATION_VALUE_POPUP); - select.addActionListener(this, FormEvent.ONCLICK); + select.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java b/src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java index 2934698568a7db9b389ed5352ed5fbf7123bdfd5..cf58b19780e96e7be25969f56e4f109cd1d56cd4 100644 --- a/src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java +++ b/src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java @@ -178,7 +178,7 @@ public class IQ12EditForm extends FormBasicController { // Only assessments have a limitation on number of attempts if (isAssessment) { limitAttempts.select("xx", confAttempts>0); - limitAttempts.addActionListener(this, FormEvent.ONCLICK); + limitAttempts.addActionListener(FormEvent.ONCLICK); } else { limitAttempts.select("xx", false); limitAttempts.setVisible(false); @@ -194,7 +194,7 @@ public class IQ12EditForm extends FormBasicController { Boolean CdisplayMenu = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_DISPLAYMENU); displayMenu = uifactory.addCheckboxesVertical("qti_displayMenu", "qti.form.menudisplay", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); displayMenu.select("xx", CdisplayMenu == null ? true : CdisplayMenu ); - displayMenu.addActionListener(this, FormEvent.ONCLICK); + displayMenu.addActionListener(FormEvent.ONCLICK); Boolean CenableMenu = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_ENABLEMENU); enableMenu = uifactory.addCheckboxesVertical("qti_enableMenu", "qti.form.menuenable", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); @@ -293,7 +293,7 @@ public class IQ12EditForm extends FormBasicController { scoreInfo.select("xx", enableScoreInfos); if (isAssessment || isSelfTest) { scoreInfo.select("xx", enableScoreInfos); - scoreInfo.addActionListener(this, FormEvent.ONCLICK); + scoreInfo.addActionListener(FormEvent.ONCLICK); } else { // isSurvey scoreInfo.setVisible(false); @@ -310,7 +310,7 @@ public class IQ12EditForm extends FormBasicController { confEnableShowResultOnHomePage = !noSummary && confEnableShowResultOnHomePage; showResultsOnHomePage = uifactory.addCheckboxesVertical("qti_enableResultsOnHomePage", "qti.form.results.onhomepage", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); showResultsOnHomePage.select("xx", confEnableShowResultOnHomePage); - showResultsOnHomePage.addActionListener(this, FormEvent.ONCLICK); + showResultsOnHomePage.addActionListener(FormEvent.ONCLICK); showResultsOnHomePage.setVisible(!isSurvey); Boolean showResultsActive = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_DATE_DEPENDENT_RESULTS); @@ -322,7 +322,7 @@ public class IQ12EditForm extends FormBasicController { showResultsDateDependentButton = uifactory.addCheckboxesVertical("qti_showresult", "qti.form.show.results", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); if (isAssessment || isSelfTest) { showResultsDateDependentButton.select("xx", showResultsDateDependent); - showResultsDateDependentButton.addActionListener(this, FormEvent.ONCLICK); + showResultsDateDependentButton.addActionListener(FormEvent.ONCLICK); } else { showResultsDateDependentButton.setEnabled(false); } @@ -343,7 +343,7 @@ public class IQ12EditForm extends FormBasicController { confEnableShowResultOnFinish = !noSummary && confEnableShowResultOnFinish; showResultsAfterFinishTest = uifactory.addCheckboxesVertical("qti_enableResultsOnFinish", "qti.form.results.onfinish", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); showResultsAfterFinishTest.select("xx", confEnableShowResultOnFinish); - showResultsAfterFinishTest.addActionListener(this, FormEvent.ONCLICK); + showResultsAfterFinishTest.addActionListener(FormEvent.ONCLICK); showResultsAfterFinishTest.setVisible(!isSurvey); String[] summaryKeys = new String[] { diff --git a/src/main/java/org/olat/course/nodes/ms/MSEditFormController.java b/src/main/java/org/olat/course/nodes/ms/MSEditFormController.java index 8ddeecd467ec859d7994ee2581f70fb1b1d1f635..a7a7f2e7bedbb2b5c95dd3ddc740e73c9627c590 100644 --- a/src/main/java/org/olat/course/nodes/ms/MSEditFormController.java +++ b/src/main/java/org/olat/course/nodes/ms/MSEditFormController.java @@ -150,7 +150,7 @@ public class MSEditFormController extends FormBasicController { protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { // Create the "score granted" field... scoreGranted = uifactory.addCheckboxesVertical("form.score", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); - scoreGranted.addActionListener(this, FormEvent.ONCLICK); + scoreGranted.addActionListener(FormEvent.ONCLICK); Boolean sf = (Boolean) modConfig.get(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD); scoreGranted.select("xx", sf == null ? false : sf.booleanValue()); @@ -176,7 +176,7 @@ public class MSEditFormController extends FormBasicController { // Create the "display passed / failed" displayPassed = uifactory.addCheckboxesVertical("form.passed", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); - displayPassed.addActionListener(this, FormEvent.ONCLICK); + displayPassed.addActionListener(FormEvent.ONCLICK); Boolean pf = (Boolean) modConfig.get(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD); if (pf == null) pf = Boolean.TRUE; displayPassed.select("xx", pf); @@ -185,7 +185,7 @@ public class MSEditFormController extends FormBasicController { // FALSE means manually)... Float cut = (Float) modConfig.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); displayType = uifactory.addRadiosVertical("form.passed.type", formLayout, trueFalseKeys, passedTypeValues); - displayType.addActionListener(this, FormEvent.ONCLICK); + displayType.addActionListener(FormEvent.ONCLICK); displayType.select(trueFalseKeys[1], true); if (cut != null) { diff --git a/src/main/java/org/olat/course/nodes/portfolio/PortfolioTextForm.java b/src/main/java/org/olat/course/nodes/portfolio/PortfolioTextForm.java index 959986839f7578adb753c52cfe994500638044e1..034cd32a639e3d5df81666aebf0b2ea22acfb779 100644 --- a/src/main/java/org/olat/course/nodes/portfolio/PortfolioTextForm.java +++ b/src/main/java/org/olat/course/nodes/portfolio/PortfolioTextForm.java @@ -102,7 +102,7 @@ public class PortfolioTextForm extends FormBasicController { translate("map.deadline." + absolutKeys[0]), translate("map.deadline." + absolutKeys[1]), translate("map.deadline." + absolutKeys[2]) }; deadlineType = uifactory.addRadiosVertical("deadline-type", "map.deadline", formLayout, absolutKeys, absolutValues); - deadlineType.addActionListener(this, FormEvent.ONCHANGE); + deadlineType.addActionListener(FormEvent.ONCHANGE); String type = (String)config.get(PortfolioCourseNodeConfiguration.DEADLINE_TYPE); if(StringHelper.containsNonWhitespace(type)) { try { @@ -124,7 +124,7 @@ public class PortfolioTextForm extends FormBasicController { deadlineChooser.setValidDateCheck("map.deadline.invalid"); deadlineChooser.setNotEmptyCheck("map.deadline.invalid"); deadlineChooser.setMandatory(true); - deadlineChooser.addActionListener(this, FormEvent.ONCHANGE); + deadlineChooser.addActionListener(FormEvent.ONCHANGE); //relativ deadline String template = Util.getPackageVelocityRoot(PortfolioConfigForm.class) + "/deadline.html"; @@ -134,17 +134,17 @@ public class PortfolioTextForm extends FormBasicController { String[] monthKeys = getTimeKeys(24); deadlineMonth = uifactory.addDropdownSingleselect("deadline-month", deadlineLayout, monthKeys, monthKeys, null); - deadlineMonth.addActionListener(this, FormEvent.ONCHANGE); + deadlineMonth.addActionListener(FormEvent.ONCHANGE); select(deadlineMonth, PortfolioCourseNodeConfiguration.DEADLINE_MONTH, monthKeys); String[] weekKeys = getTimeKeys(4); deadlineWeek = uifactory.addDropdownSingleselect("deadline-week", deadlineLayout, weekKeys, weekKeys, null); - deadlineWeek.addActionListener(this, FormEvent.ONCHANGE); + deadlineWeek.addActionListener(FormEvent.ONCHANGE); select(deadlineWeek, PortfolioCourseNodeConfiguration.DEADLINE_WEEK, weekKeys); String[] dayKeys = getTimeKeys(7); deadlineDay = uifactory.addDropdownSingleselect("deadline-day", deadlineLayout, dayKeys, dayKeys, null); - deadlineDay.addActionListener(this, FormEvent.ONCHANGE); + deadlineDay.addActionListener(FormEvent.ONCHANGE); select(deadlineDay, PortfolioCourseNodeConfiguration.DEADLINE_DAY, dayKeys); formLayout.add(deadlineLayout); diff --git a/src/main/java/org/olat/course/nodes/projectbroker/InlineEditDetailsFormController.java b/src/main/java/org/olat/course/nodes/projectbroker/InlineEditDetailsFormController.java index 03d4e15dcd07fbf8b6339d52738368b934c7825c..59d0f969bc69850b04c5e4f772753187680d1ca1 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/InlineEditDetailsFormController.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/InlineEditDetailsFormController.java @@ -237,7 +237,7 @@ public class InlineEditDetailsFormController extends FormBasicController { if (project.getAttachmentFileName() != null && !project.getAttachmentFileName().equals("")) { attachmentFileName.setInitialFile(new File(project.getAttachmentFileName())); } - attachmentFileName.addActionListener(this, FormEvent.ONCHANGE); + attachmentFileName.addActionListener(FormEvent.ONCHANGE); uifactory.addFormSubmitButton("save", formLayout); } diff --git a/src/main/java/org/olat/course/nodes/projectbroker/ModulesFormController.java b/src/main/java/org/olat/course/nodes/projectbroker/ModulesFormController.java index 473e0f63419700b81c465e190dbc53b0d3c3df12..5f2c46afc6fef1ac1f501b091c6c7e863a8bbcbf 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/ModulesFormController.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/ModulesFormController.java @@ -68,13 +68,13 @@ public class ModulesFormController extends FormBasicController { final Boolean dropboxEnabled = (Boolean)config.get(ProjectBrokerCourseNode.CONF_DROPBOX_ENABLED); selectionDropbox = uifactory.addCheckboxesVertical("dropbox", "form.modules.dropbox", formLayout, keys, values, null, 1); selectionDropbox.select(keys[0], dropboxEnabled); - selectionDropbox.addActionListener(this, FormEvent.ONCLICK); + selectionDropbox.addActionListener(FormEvent.ONCLICK); // TODO:cg 28.01.2010 no assessment-tool in V1.0 // final Boolean scoringEnabled = (Boolean)config.get(ProjectBrokerCourseNode.CONF_SCORING_ENABLED); // selectionScoring = uifactory.addCheckboxesVertical("scoring", "form.modules.scoring", formLayout, keys, values, null, 1); // selectionScoring.select(keys[0], scoringEnabled); -// selectionScoring.addActionListener(this, FormEvent.ONCLICK); +// selectionScoring.addActionListener(FormEvent.ONCLICK); // selectionScoring.setVisible(false);// not available yet Boolean returnboxEnabled = (Boolean)config.get(ProjectBrokerCourseNode.CONF_RETURNBOX_ENABLED); @@ -83,7 +83,7 @@ public class ModulesFormController extends FormBasicController { } selectionReturnbox = uifactory.addCheckboxesVertical("returnbox", "form.modules.returnbox", formLayout, keys, values, null, 1); selectionReturnbox.select(keys[0], returnboxEnabled); - selectionReturnbox.addActionListener(this, FormEvent.ONCLICK); + selectionReturnbox.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/course/nodes/projectbroker/OptionsFormController.java b/src/main/java/org/olat/course/nodes/projectbroker/OptionsFormController.java index 439e31801e8fe6c1b0045d792ba521186cf7b2ea..d5d90ba5bdb86c43973763b8a8bac62c87674ac7 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/OptionsFormController.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/OptionsFormController.java @@ -88,26 +88,26 @@ public class OptionsFormController extends FormBasicController { nbrOfAttendees = uifactory.addIntegerElement("form.options.number.of.participants.per.topic_nbr", nbrOfParticipantsValue, formLayout); nbrOfAttendees.setMinValueCheck(0, null); nbrOfAttendees.setDisplaySize(3); - nbrOfAttendees.addActionListener(listener, FormEvent.ONCHANGE); + nbrOfAttendees.addActionListener(FormEvent.ONCHANGE); if (nbrOfParticipantsValue == ProjectBrokerModuleConfiguration.NBR_PARTICIPANTS_UNLIMITED) { nbrOfAttendees.setVisible(false); selectionLimitedAttendees.select(keys[0], false); } else { selectionLimitedAttendees.select(keys[0], true); } - selectionLimitedAttendees.addActionListener(listener, FormEvent.ONCLICK); + selectionLimitedAttendees.addActionListener(FormEvent.ONCLICK); final Boolean selectionAcceptValue = config.isAcceptSelectionManually(); selectionAccept = uifactory.addCheckboxesVertical("form.options.selection.accept", formLayout, keys, values, null, 1); selectionAccept.select(keys[0], selectionAcceptValue); - selectionAccept.addActionListener(this, FormEvent.ONCLICK); + selectionAccept.addActionListener(FormEvent.ONCLICK); final Boolean autoSignOut = config.isAutoSignOut(); selectionAutoSignOut = uifactory.addCheckboxesVertical("form.options.auto.sign.out", formLayout, keys, values, null, 1); selectionAutoSignOut.select(keys[0], autoSignOut); // enable auto-sign-out only when 'accept-selection' is enabled selectionAutoSignOut.setVisible(selectionAcceptValue); - selectionAutoSignOut.addActionListener(this, FormEvent.ONCLICK); + selectionAutoSignOut.addActionListener(FormEvent.ONCLICK); uifactory.addFormSubmitButton("save", formLayout); } diff --git a/src/main/java/org/olat/course/nodes/projectbroker/ProjectEditDetailsFormController.java b/src/main/java/org/olat/course/nodes/projectbroker/ProjectEditDetailsFormController.java index 758d6cd4055f636ef67160f27751ccf6f40a4a0c..cf2fc8b101bdd23dcb9d2d8f2fdc72ffb0a7ae98 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/ProjectEditDetailsFormController.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/ProjectEditDetailsFormController.java @@ -208,7 +208,7 @@ public class ProjectEditDetailsFormController extends FormBasicController { } else { selectionMaxMembers.select(keys[0], true); } - selectionMaxMembers.addActionListener(listener, FormEvent.ONCLICK); + selectionMaxMembers.addActionListener(FormEvent.ONCLICK); uifactory.addSpacerElement("spacer_1", formLayout, false); // customfields @@ -291,7 +291,7 @@ public class ProjectEditDetailsFormController extends FormBasicController { attachmentFileName.setInitialFile(new File(project.getAttachmentFileName())); removeAttachmentLink = uifactory.addFormLink("detailsform.remove.attachment", formLayout, Link.BUTTON_XSMALL); } - attachmentFileName.addActionListener(this, FormEvent.ONCHANGE); + attachmentFileName.addActionListener(FormEvent.ONCHANGE); mailNotification = uifactory.addCheckboxesHorizontal("detailsform.mail.notification.label", formLayout, keys, values, null); mailNotification.select(keys[0], project.isMailNotificationEnabled()); diff --git a/src/main/java/org/olat/course/nodes/projectbroker/ProjectEventFormController.java b/src/main/java/org/olat/course/nodes/projectbroker/ProjectEventFormController.java index 49d49177e3b2806456762ce1a09bb3adecfc1088..89181c0929a6b025ec10b9b1f50a81b7ab73127a 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/ProjectEventFormController.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/ProjectEventFormController.java @@ -84,7 +84,7 @@ public class ProjectEventFormController extends FormBasicController { projectEventElement.select(keys[0], isEventEnabled); projectEventElement.setVisible(keys[1], isEventEnabled); projectEventElement.select(keys[1], isTableViewEnabled); - projectEventElement.addActionListener(listener, FormEvent.ONCLICK); + projectEventElement.addActionListener(FormEvent.ONCLICK); projectEventElementList.put(eventType, projectEventElement); } formSubmit = uifactory.addFormSubmitButton("save", formLayout); diff --git a/src/main/java/org/olat/course/nodes/scorm/ScormEditController.java b/src/main/java/org/olat/course/nodes/scorm/ScormEditController.java index aaa72ffdbf94239bb4a4ccf56c38a019e974615b..880c6cbb8f724120e538fe6423fb666704dd7cb0 100644 --- a/src/main/java/org/olat/course/nodes/scorm/ScormEditController.java +++ b/src/main/java/org/olat/course/nodes/scorm/ScormEditController.java @@ -549,10 +549,10 @@ class VarForm extends FormBasicController { cutValueEl.setDisplaySize(3); // <OLATCE-289> - isAssessableEl.addActionListener(this, FormEvent.ONCHANGE); + isAssessableEl.addActionListener(FormEvent.ONCHANGE); advanceScoreEl = uifactory.addCheckboxesVertical("advanceScore", "advance.score.label", formLayout, new String[]{"ison"}, new String[]{null}, null, 1); advanceScoreEl.select("ison", advanceScore); - advanceScoreEl.addActionListener(this, FormEvent.ONCHANGE); + advanceScoreEl.addActionListener(FormEvent.ONCHANGE); //assessable type score/passed -> show "Prevent subsequent attempts from decreasing score" RulesFactory.createHideRule(isAssessableEl, assessableKeys[0], advanceScoreEl, formLayout); @@ -566,7 +566,7 @@ class VarForm extends FormBasicController { scoreAttemptsEl = uifactory.addCheckboxesVertical("scoreAttempts", "attempts.depends.label", formLayout, new String[]{"ison"}, new String[]{null}, null, 1); scoreAttemptsEl.select("ison", scoreAttempts); - scoreAttemptsEl.addActionListener(this, FormEvent.ONCHANGE); + scoreAttemptsEl.addActionListener(FormEvent.ONCHANGE); RulesFactory.createShowRule(advanceScoreEl, "ison", scoreAttemptsEl, formLayout); RulesFactory.createHideRule(advanceScoreEl, null, scoreAttemptsEl, formLayout); diff --git a/src/main/java/org/olat/course/nodes/st/EditScoreCalculationEasyForm.java b/src/main/java/org/olat/course/nodes/st/EditScoreCalculationEasyForm.java index 27bcb8f33fde6f7d98babc1190101811a9977b5e..d70c8b107061d9cd45b45f638bba7cef811bfcf2 100644 --- a/src/main/java/org/olat/course/nodes/st/EditScoreCalculationEasyForm.java +++ b/src/main/java/org/olat/course/nodes/st/EditScoreCalculationEasyForm.java @@ -283,7 +283,7 @@ public class EditScoreCalculationEasyForm extends FormBasicController { hasScore = uifactory.addCheckboxesHorizontal("scform.hasScore", formLayout, new String[]{"xx"}, new String[]{null}, null); hasScore.select("xx", sc != null && sc.getSumOfScoreNodes() != null && sc.getSumOfScoreNodes().size() > 0); - hasScore.addActionListener(listener, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + hasScore.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 scoreNodeIdents = initNodeSelectionElement( formLayout, "scform.scoreNodeIndents", sc, (sc == null ? null : sc.getSumOfScoreNodes()), nodeIdentList @@ -294,7 +294,7 @@ public class EditScoreCalculationEasyForm extends FormBasicController { hasPassed = uifactory.addCheckboxesHorizontal("scform.passedtype", formLayout, new String[]{"xx"}, new String[]{null}, null); hasPassed.select("xx", sc != null && sc.getPassedType() != null && !sc.getPassedType().equals(ScoreCalculator.PASSED_TYPE_NONE)); - hasPassed.addActionListener(listener, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + hasPassed.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 String[] passedTypeKeys = new String[] { ScoreCalculator.PASSED_TYPE_CUTVALUE, @@ -312,7 +312,7 @@ public class EditScoreCalculationEasyForm extends FormBasicController { } else { passedType.select(ScoreCalculator.PASSED_TYPE_CUTVALUE, true); } - passedType.addActionListener(listener, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + passedType.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 int cutinitval = 0; if (sc != null) cutinitval = sc.getPassedCutValue(); diff --git a/src/main/java/org/olat/course/nodes/st/STCourseNodeDisplayConfigFormController.java b/src/main/java/org/olat/course/nodes/st/STCourseNodeDisplayConfigFormController.java index 7937a7e42d59062a894410943c68c0a280b13b1e..49131cd36a37596fa1a67fc1a77f76d8889eaf55 100644 --- a/src/main/java/org/olat/course/nodes/st/STCourseNodeDisplayConfigFormController.java +++ b/src/main/java/org/olat/course/nodes/st/STCourseNodeDisplayConfigFormController.java @@ -132,7 +132,7 @@ public class STCourseNodeDisplayConfigFormController extends FormBasicController String[] values_displayType = new String[] { translate("form.system"), translate("form.peekview"), translate("form.self"), translate("form.delegate") }; displayTypeRadios = formFact.addRadiosVertical("selforsystemoverview", formLayout, keys_displayType, values_displayType); - displayTypeRadios.addActionListener(this, FormEvent.ONCLICK); + displayTypeRadios.addActionListener(FormEvent.ONCLICK); if (displayConfig.equals(STCourseNodeEditController.CONFIG_VALUE_DISPLAY_FILE)) { displayTypeRadios.select("file", true); } else if (displayConfig.equals(STCourseNodeEditController.CONFIG_VALUE_DISPLAY_PEEKVIEW)) { @@ -163,7 +163,7 @@ public class STCourseNodeDisplayConfigFormController extends FormBasicController // selected to reflect meaningfull default configuration preselectConfiguredOrMaxChildNodes(); // Add as listener for any changes - selectedPeekviewChildren.addActionListener(this, FormEvent.ONCLICK); + selectedPeekviewChildren.addActionListener(FormEvent.ONCLICK); } // // Number of rows (only available in system or peekview type) @@ -171,7 +171,7 @@ public class STCourseNodeDisplayConfigFormController extends FormBasicController displayTwoColumns = formFact .addCheckboxesVertical("displayTwoColumns", formLayout, new String[] { "on" }, new String[] { "" }, null, 1); displayTwoColumns.setLabel("displayTwoColumns", null); - displayTwoColumns.addActionListener(this, FormEvent.ONCLICK); + displayTwoColumns.addActionListener(FormEvent.ONCLICK); if (columnsConfig == 2) { displayTwoColumns.selectAll(); } diff --git a/src/main/java/org/olat/course/nodes/ta/DropboxForm.java b/src/main/java/org/olat/course/nodes/ta/DropboxForm.java index 85b88f7bde15d79903c8eefa592adbda1829ef2e..9b090094258f85c114e6e3c9936353be78766847 100644 --- a/src/main/java/org/olat/course/nodes/ta/DropboxForm.java +++ b/src/main/java/org/olat/course/nodes/ta/DropboxForm.java @@ -115,7 +115,7 @@ public class DropboxForm extends FormBasicController { confirmation.setMandatory(enableMail); enablemail = uifactory.addCheckboxesVertical("enablemail", "form.dropbox.enablemail", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); enablemail.select("xx", enableMail != null ? enableMail.booleanValue() : true); - enablemail.addActionListener(this, FormEvent.ONCLICK); + enablemail.addActionListener(FormEvent.ONCLICK); uifactory.addFormSubmitButton("submit", formLayout); } diff --git a/src/main/java/org/olat/course/nodes/ta/ModulesForm.java b/src/main/java/org/olat/course/nodes/ta/ModulesForm.java index 249188b4620a30868aad069834e4b30a551378d3..378a1d7bb4fa6c911cb6a8304190ce68a466412f 100644 --- a/src/main/java/org/olat/course/nodes/ta/ModulesForm.java +++ b/src/main/java/org/olat/course/nodes/ta/ModulesForm.java @@ -115,11 +115,11 @@ public class ModulesForm extends FormBasicController { cv = (Boolean)config.get(TACourseNode.CONF_SOLUTION_ENABLED); solution.select("xx", cv == null ? false : cv.booleanValue()); - task.addActionListener(this, FormEvent.ONCLICK); - dropbox.addActionListener(this, FormEvent.ONCLICK); - returnbox.addActionListener(this, FormEvent.ONCLICK); - scoring.addActionListener(this, FormEvent.ONCLICK); - solution.addActionListener(this, FormEvent.ONCLICK); + task.addActionListener(FormEvent.ONCLICK); + dropbox.addActionListener(FormEvent.ONCLICK); + returnbox.addActionListener(FormEvent.ONCLICK); + scoring.addActionListener(FormEvent.ONCLICK); + solution.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/course/nodes/ta/TaskFormController.java b/src/main/java/org/olat/course/nodes/ta/TaskFormController.java index 2cbb8a3ff0258092089884f51b8501b0d5dc3eee..d3db8ae130b43c7e5dd2d16d1cd179985adcb960 100644 --- a/src/main/java/org/olat/course/nodes/ta/TaskFormController.java +++ b/src/main/java/org/olat/course/nodes/ta/TaskFormController.java @@ -115,7 +115,7 @@ public class TaskFormController extends FormBasicController { } else { this.type.select(TaskController.TYPE_MANUAL, true); } - this.type.addActionListener(this, FormEvent.ONCLICK); + this.type.addActionListener(FormEvent.ONCLICK); // add the preview radio buttons Boolean taskPreview = Boolean.valueOf(false);// per default no preview @@ -131,7 +131,7 @@ public class TaskFormController extends FormBasicController { } else { this.preview.select(TaskController.WITHOUT_PREVIEW, true); } - this.preview.addActionListener(this, FormEvent.ONCLICK); + this.preview.addActionListener(FormEvent.ONCLICK); // add the deselect radio buttons Boolean taskDeselect = Boolean.valueOf(false);// per default no deselect possible diff --git a/src/main/java/org/olat/course/nodes/tu/TUConfigForm.java b/src/main/java/org/olat/course/nodes/tu/TUConfigForm.java index 7471b63797ce9a628ed1265646d6e0f8caabc043..c57c327f4b51dc7346856a540d18913d648f59d8 100644 --- a/src/main/java/org/olat/course/nodes/tu/TUConfigForm.java +++ b/src/main/java/org/olat/course/nodes/tu/TUConfigForm.java @@ -271,13 +271,13 @@ public class TUConfigForm extends FormBasicController { String loadedConfig = convertConfigToNewStyle(config); selectables = uifactory.addRadiosVertical("selectables", NLS_DISPLAY_CONFIG_EXTERN, formLayout, selectableValues, selectableLabels); selectables.select(loadedConfig, true); - selectables.addActionListener(this, FormEvent.ONCLICK); + selectables.addActionListener(FormEvent.ONCLICK); checkboxPagePasswordProtected = uifactory.addCheckboxesVertical("checkbox", "TUConfigForm.protected", formLayout, new String[] { "ison" }, new String[] { "" }, null, 1); checkboxPagePasswordProtected.select("ison", (user != null) && !user.equals("")); // register for on click event to hide/disable other elements - checkboxPagePasswordProtected.addActionListener(listener, FormEvent.ONCLICK); + checkboxPagePasswordProtected.addActionListener(FormEvent.ONCLICK); tuser = uifactory.addTextElement("user", "TUConfigForm.user", 255, user == null ? "" : user, formLayout); tpass = uifactory.addPasswordElement("pass", "TUConfigForm.pass", 255, pass == null ? "" : pass, formLayout); diff --git a/src/main/java/org/olat/course/site/ui/CourseSiteAdminController.java b/src/main/java/org/olat/course/site/ui/CourseSiteAdminController.java index d93f3d73e79e8b6db6efaeeb88875508b2b38201..99e60d798bb30a619f7f714aac67b60c47327560 100644 --- a/src/main/java/org/olat/course/site/ui/CourseSiteAdminController.java +++ b/src/main/java/org/olat/course/site/ui/CourseSiteAdminController.java @@ -95,7 +95,7 @@ public class CourseSiteAdminController extends FormBasicController { setFormTitle("admin.menu.title"); enableToolbar = uifactory.addCheckboxesHorizontal("site.enable.toolbar", "site.enable.toolbar", formLayout, new String[]{ "x" }, new String[]{ "" }, null); - enableToolbar.addActionListener(this, FormEvent.ONCHANGE); + enableToolbar.addActionListener(FormEvent.ONCHANGE); if(siteConfiguration.isToolbar()) { enableToolbar.select("x", true); } diff --git a/src/main/java/org/olat/group/ui/BusinessGroupModuleAdminController.java b/src/main/java/org/olat/group/ui/BusinessGroupModuleAdminController.java index 3c9d6daddeb911cdab336ad51a8f539e070fa5e1..1778ee9071b535ede1a1a4ee3d7248684b4488b4 100644 --- a/src/main/java/org/olat/group/ui/BusinessGroupModuleAdminController.java +++ b/src/main/java/org/olat/group/ui/BusinessGroupModuleAdminController.java @@ -87,7 +87,7 @@ public class BusinessGroupModuleAdminController extends FormBasicController impl allowEl = uifactory.addCheckboxesVertical("module.admin.allow.create", optionsContainer, onKeys, values, null, 1); allowEl.select("user", module.isUserAllowedCreate()); allowEl.select("author", module.isAuthorAllowedCreate()); - allowEl.addActionListener(this, FormEvent.ONCHANGE); + allowEl.addActionListener(FormEvent.ONCHANGE); FormLayoutContainer resourceAssignmentContainer = FormLayoutContainer.createDefaultFormLayout("resourceAssignment", getTranslator()); formLayout.add(resourceAssignmentContainer); @@ -95,12 +95,12 @@ public class BusinessGroupModuleAdminController extends FormBasicController impl String[] courseValues = new String[]{ translate("module.resource.courses.grant") }; assignCoursesEl = uifactory.addCheckboxesVertical("module.resource.courses", resourceAssignmentContainer, assignKeys, courseValues, null, 1); assignCoursesEl.select(assignKeys[0], module.isGroupManagersAllowedToLinkCourses()); - assignCoursesEl.addActionListener(this, FormEvent.ONCHANGE); + assignCoursesEl.addActionListener(FormEvent.ONCHANGE); String[] groupValues = new String[]{ translate("module.resource.groups.grant") }; assignGroupsEl = uifactory.addCheckboxesVertical("module.resource.groups", resourceAssignmentContainer, assignKeys, groupValues, null, 1); assignGroupsEl.select(assignKeys[0], module.isResourceManagersAllowedToLinkGroups()); - assignGroupsEl.addActionListener(this, FormEvent.ONCHANGE); + assignGroupsEl.addActionListener(FormEvent.ONCHANGE); FormLayoutContainer privacyOptionsContainer = FormLayoutContainer.createDefaultFormLayout("privacy_options", getTranslator()); formLayout.add(privacyOptionsContainer); @@ -117,7 +117,7 @@ public class BusinessGroupModuleAdminController extends FormBasicController impl enrolmentEl.select("usermanagers", "true".equals(module.getMandatoryEnrolmentEmailForUsermanagers())); enrolmentEl.select("groupmanagers", "true".equals(module.getMandatoryEnrolmentEmailForGroupmanagers())); enrolmentEl.select("administrators", "true".equals(module.getMandatoryEnrolmentEmailForAdministrators())); - enrolmentEl.addActionListener(this, FormEvent.ONCHANGE); + enrolmentEl.addActionListener(FormEvent.ONCHANGE); String[] membershipValues = new String[]{ translate("enrolment.email.users"), @@ -132,7 +132,7 @@ public class BusinessGroupModuleAdminController extends FormBasicController impl membershipEl.select("usermanagers", "true".equals(module.getAcceptMembershipForUsermanagers())); membershipEl.select("groupmanagers", "true".equals(module.getAcceptMembershipForGroupmanagers())); membershipEl.select("administrators", "true".equals(module.getAcceptMembershipForAdministrators())); - membershipEl.addActionListener(this, FormEvent.ONCHANGE); + membershipEl.addActionListener(FormEvent.ONCHANGE); FormLayoutContainer dedupCont = FormLayoutContainer.createDefaultFormLayout("dedup", getTranslator()); formLayout.add(dedupCont); diff --git a/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java b/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java index 7347c4d1f29b87adbe98315ac3481100def66354..ee1dfa414b3e2cc5269aab0178ed7d633f7e49fd 100644 --- a/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java +++ b/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java @@ -157,13 +157,13 @@ public class DisplayMemberSwitchForm extends FormBasicController { downloadList = uifactory.addCheckboxesVertical("DownloadList", "chkBox.open.downloadList", formLayout, new String[]{"download_list"}, new String[]{""}, null, 1); - showOwners.addActionListener(this, FormEvent.ONCLICK); - showPartips.addActionListener(this, FormEvent.ONCLICK); - showWaitingList.addActionListener(this, FormEvent.ONCLICK); - openOwners.addActionListener(this, FormEvent.ONCLICK); - openPartips.addActionListener(this, FormEvent.ONCLICK); - openWaitingList.addActionListener(this, FormEvent.ONCLICK); - downloadList.addActionListener(this, FormEvent.ONCLICK); + showOwners.addActionListener(FormEvent.ONCLICK); + showPartips.addActionListener(FormEvent.ONCLICK); + showWaitingList.addActionListener(FormEvent.ONCLICK); + openOwners.addActionListener(FormEvent.ONCLICK); + openPartips.addActionListener(FormEvent.ONCLICK); + openWaitingList.addActionListener(FormEvent.ONCLICK); + downloadList.addActionListener(FormEvent.ONCLICK); } @Override diff --git a/src/main/java/org/olat/group/ui/run/BusinessGroupSendToChooserForm.java b/src/main/java/org/olat/group/ui/run/BusinessGroupSendToChooserForm.java index eb090a2b17ffef746e3aeb4daca02cc7733a0a86..7b209ab6fc59a63f76e83a5c1bb4a2e96e2314ae 100644 --- a/src/main/java/org/olat/group/ui/run/BusinessGroupSendToChooserForm.java +++ b/src/main/java/org/olat/group/ui/run/BusinessGroupSendToChooserForm.java @@ -412,7 +412,7 @@ public class BusinessGroupSendToChooserForm extends FormBasicController { //if (!isRightGroup()) { radioButtonOwner = uifactory.addRadiosVertical("radioButtonOwner", "sendtochooser.form.radio.owners", formLayout, radioKeysOwners, radioValuesOwners); radioButtonOwner.select(NLS_RADIO_ALL, true); - radioButtonOwner.addActionListener(listener, FormEvent.ONCLICK); + radioButtonOwner.addActionListener(FormEvent.ONCLICK); if ( (keysOwner != null) && (valuesOwner != null) ) { multiSelectionOwnerKeys = uifactory.addCheckboxesVertical("multiSelectionOwnerKeys", "", formLayout, keysOwner, valuesOwner, null, 1); } @@ -420,14 +420,14 @@ public class BusinessGroupSendToChooserForm extends FormBasicController { radioButtonPartips = uifactory.addRadiosVertical("radioButtonPartip", "sendtochooser.form.radio.rightgroup", formLayout, radioKeysPartips, radioValuesPartips); radioButtonPartips.select(NLS_RADIO_ALL, true); - radioButtonPartips.addActionListener(listener, FormEvent.ONCLICK); + radioButtonPartips.addActionListener(FormEvent.ONCLICK); if ( (keysPartips != null) && (valuesPartips != null) ) { multiSelectionPartipKeys = uifactory.addCheckboxesVertical("multiSelectionPartipKeys", "", formLayout, keysPartips, valuesPartips, null, 1); } radioButtonWaitings = uifactory.addRadiosVertical("radioButtonWaiting", "sendtochooser.form.radio.waitings", formLayout, radioKeysWaitings, radioValuesWaitings); radioButtonWaitings.select(NLS_RADIO_NOTHING, true); - radioButtonWaitings.addActionListener(listener, FormEvent.ONCLICK); + radioButtonWaitings.addActionListener(FormEvent.ONCLICK); if ( (keysWaitings != null) && (valuesWaitings != null) ) { multiSelectionWaitingKeys = uifactory.addCheckboxesVertical("multiSelectionWaitingKeys", "", formLayout, keysWaitings, valuesWaitings, null, 1); } diff --git a/src/main/java/org/olat/group/ui/wizard/BGConfigToolsStepController.java b/src/main/java/org/olat/group/ui/wizard/BGConfigToolsStepController.java index 2ba6e21b2d342d99d9b80af76e46cedd6aa61560..8c4de18744d892f95f80dde5a8fa7cc175170042 100644 --- a/src/main/java/org/olat/group/ui/wizard/BGConfigToolsStepController.java +++ b/src/main/java/org/olat/group/ui/wizard/BGConfigToolsStepController.java @@ -87,7 +87,7 @@ public class BGConfigToolsStepController extends StepFormBasicController { String i18n = first ? "config.tools.desc" : null; MultipleSelectionElement selectEl = uifactory.addCheckboxesHorizontal(k, i18n, formLayout, keys, values, null); - selectEl.addActionListener(this, FormEvent.ONCHANGE); + selectEl.addActionListener(FormEvent.ONCHANGE); toolList.add(selectEl); ToolConfig config = new ToolConfig(k); @@ -98,7 +98,7 @@ public class BGConfigToolsStepController extends StepFormBasicController { config.configContainer.setRootForm(mainForm); formLayout.add(config.configContainer); config.enableEl = uifactory.addRadiosHorizontal("config.enable." + k, null, config.configContainer, enableKeys, enableValues); - config.enableEl.addActionListener(this, FormEvent.ONCHANGE); + config.enableEl.addActionListener(FormEvent.ONCHANGE); config.enableEl.select("off", true); enableList.add(config.enableEl); config.enableEl.setUserObject(config); diff --git a/src/main/java/org/olat/group/ui/wizard/BGMailTemplateController.java b/src/main/java/org/olat/group/ui/wizard/BGMailTemplateController.java index 0392fabfcaf0cf75619be43bd93a660535c25380..cdfa22c7b382add9b28118a25536b5a76e6ae545 100644 --- a/src/main/java/org/olat/group/ui/wizard/BGMailTemplateController.java +++ b/src/main/java/org/olat/group/ui/wizard/BGMailTemplateController.java @@ -159,7 +159,7 @@ public class BGMailTemplateController extends FormBasicController { if(!mandatoryEmail) { sendMail = uifactory.addCheckboxesVertical("sendmail", "", formLayout, new String[]{"xx"}, new String[]{translate("mailtemplateform.sendMailSwitchElem")}, null, 1); sendMail.select("xx", true); - sendMail.addActionListener(listener, FormEvent.ONCLICK); + sendMail.addActionListener(FormEvent.ONCLICK); } defaultTemplate = uifactory.addCheckboxesVertical("deftemplate", "", formLayout, new String[]{"xx"}, new String[]{translate("mailtemplateform.defaultTemplate")}, null, 1); @@ -167,7 +167,7 @@ public class BGMailTemplateController extends FormBasicController { defaultTemplate.select("xx", true); } - defaultTemplate.addActionListener(listener, FormEvent.ONCLICK); + defaultTemplate.addActionListener(FormEvent.ONCLICK); defaultTemplate.setEnabled(customizingAvailable); if(customizingAvailable) { diff --git a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormAdvancedController.java b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormAdvancedController.java index af4ccdbb5cd96a4b1b63f6a586421610317d430f..02d766d8ce8263c0277ceb65bdb75f02b9952286 100644 --- a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormAdvancedController.java +++ b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormAdvancedController.java @@ -129,7 +129,7 @@ public class GuiDemoFlexiFormAdvancedController extends FormBasicController { // Add some rich text elements richTextElement = uifactory.addRichTextElementForStringData("guidemo.form.richtext.simple", "guidemo.form.richtext.simple", "click <i>to</i> <b>edit</b>. This one has an event listener and an <b>external menu with auto hide</b>", -1, -1, false, null, null, formLayout, ureq.getUserSession(), getWindowControl()); - //richTextElement.addActionListener(this, FormEvent.ONCHANGE); + //richTextElement.addActionListener(FormEvent.ONCHANGE); richTextElement2 = uifactory.addRichTextElementForStringData("guidemo.form.richtext.simple2", null, "one <i>with</i> <b>height</b> and <span style='color:red'>no</span> event listener and an <b>internal</b> menu", 10, 40, true, null, null, formLayout, ureq.getUserSession(), getWindowControl()); @@ -198,7 +198,7 @@ public class GuiDemoFlexiFormAdvancedController extends FormBasicController { // As an example on how to use the formInnerEvent method we'll catch events // on these radio buttons and therefore need to add the current controller // to their listeners. - verticalRadioButtons.addActionListener(this, FormEvent.ONCLICK); + verticalRadioButtons.addActionListener(FormEvent.ONCLICK); // checkboxes final MultipleSelectionElement checkboxes = uifactory.addCheckboxesVertical("checkboxes", "advanced_form.checkboxes", form, keys, options, null, 1); @@ -214,7 +214,7 @@ public class GuiDemoFlexiFormAdvancedController extends FormBasicController { yesOrNoOptions); // A default value is needed for show/hide rules horizontalRadioButtons.select(yesOrNoKeys[0], true); - horizontalRadioButtons.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + horizontalRadioButtons.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 } /** diff --git a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormHideUnhide.java b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormHideUnhide.java index 68e85d16e38adaae4b175532575aa1f29e5354fb..557d8db751baf3c3dd7d2d85d413c9598243762e 100644 --- a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormHideUnhide.java +++ b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormHideUnhide.java @@ -130,7 +130,7 @@ public class GuiDemoFlexiFormHideUnhide extends FormBasicController{ checkbox = uifactory.addCheckboxesVertical("checkbox", "guidemo.flexi.form.show", formLayout, new String[] { "ison" }, new String[] { "" }, null, 1); checkbox.select("ison", true); // register for on click event to hide/disable other elements - checkbox.addActionListener(listener, FormEvent.ONCLICK); + checkbox.addActionListener(FormEvent.ONCLICK); //rule to hide/unhide is defined at the end firstName = uifactory.addTextElement("firstname", "guidemo.flexi.form.firstname", 256, personData.getFirstName(), formLayout); diff --git a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormSubworkflow.java b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormSubworkflow.java index f638d2e37eb408908a7d756c6a12908fc966fe7e..3819834b1c80362ea52af9458a173f074bf29d01 100644 --- a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormSubworkflow.java +++ b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiFormSubworkflow.java @@ -244,7 +244,7 @@ public class GuiDemoFlexiFormSubworkflow extends FormBasicController { entrySelector.select(selection, true); } //on click do something -> see the formInnerEvent method - entrySelector.addActionListener(this, FormEvent.ONCLICK); + entrySelector.addActionListener(FormEvent.ONCLICK); } diff --git a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiTablesController.java b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiTablesController.java index 29fd25c63e248545f82b4eaa4036a6d339b84cb6..d22ec395c9cc557f46bf0be1acfc25c25e78553c 100644 --- a/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiTablesController.java +++ b/src/main/java/org/olat/gui/demo/guidemo/GuiDemoFlexiTablesController.java @@ -196,7 +196,7 @@ public class GuiDemoFlexiTablesController extends FormBasicController { // column 7: Action Link FormLinkImpl link = new FormLinkImpl("choose"); link.setUserObject(Integer.valueOf(i)); - link.addActionListener(controller, FormEvent.ONCLICK); + link.addActionListener(FormEvent.ONCLICK); col7 = link; } diff --git a/src/main/java/org/olat/ims/cp/ui/CPFileImportController.java b/src/main/java/org/olat/ims/cp/ui/CPFileImportController.java index bb6606f93c9a47345c32e118568214a4678624f9..64806743bfe8347b546da3c4c8b81853823d715a 100644 --- a/src/main/java/org/olat/ims/cp/ui/CPFileImportController.java +++ b/src/main/java/org/olat/ims/cp/ui/CPFileImportController.java @@ -116,7 +116,7 @@ public class CPFileImportController extends FormBasicController { file = uifactory.addFileElement("file", this.flc); file.setLabel("cpfileuploadcontroller.import.text", null); - file.addActionListener(this, FormEvent.ONCHANGE); + file.addActionListener(FormEvent.ONCHANGE); Long uploadLimitKb = getUploadLimitKb(); if(uploadLimitKb != null) { diff --git a/src/main/java/org/olat/ims/cp/ui/CPMDFlexiForm.java b/src/main/java/org/olat/ims/cp/ui/CPMDFlexiForm.java index 02db138d7238523faece3660a9f0f3144fe49184..a149eff2e60c437f4bb306825d9cb3461b14c76e 100644 --- a/src/main/java/org/olat/ims/cp/ui/CPMDFlexiForm.java +++ b/src/main/java/org/olat/ims/cp/ui/CPMDFlexiForm.java @@ -164,11 +164,11 @@ public class CPMDFlexiForm extends FormBasicController { // Submit buttons lSave = new FormLinkImpl("lSave", "lSave", "submit", Link.BUTTON); - lSave.addActionListener(this, FormEvent.ONCLICK); + lSave.addActionListener(FormEvent.ONCLICK); lSaveandclose = new FormLinkImpl("lSaveandclose", "lSaveandclose", "saveandclose", Link.BUTTON); - lSaveandclose.addActionListener(this, FormEvent.ONCLICK); + lSaveandclose.addActionListener(FormEvent.ONCLICK); buttonContainer.add(lSave); buttonContainer.add(lSaveandclose); diff --git a/src/main/java/org/olat/ims/qti/editor/FeedbackFormController.java b/src/main/java/org/olat/ims/qti/editor/FeedbackFormController.java index cb59fc1027e126b09316f770723d13077af31c27..33d7b2c8f84d24e5944d43a395ca53d253af684c 100644 --- a/src/main/java/org/olat/ims/qti/editor/FeedbackFormController.java +++ b/src/main/java/org/olat/ims/qti/editor/FeedbackFormController.java @@ -200,7 +200,7 @@ public class FeedbackFormController extends FormBasicController { yesNoValues = new String[] { translate(YES), translate(NO) }; feedbackSwitch = uifactory.addRadiosHorizontal("feedbackswitch", switchLayout, yesNoKeys, yesNoValues); - feedbackSwitch.addActionListener(this, FormEvent.ONCLICK); + feedbackSwitch.addActionListener(FormEvent.ONCLICK); if (control.isFeedback()) { feedbackSwitch.select(yesNoKeys[0], true); } else { @@ -283,8 +283,8 @@ public class FeedbackFormController extends FormBasicController { */ private void registerFeedbackElement(Material mat, RichTextElement textElement, FormLink link) { textElement.setEnabled(false); - textElement.addActionListener(this, FormEvent.ONCLICK); - link.addActionListener(this, FormEvent.ONCLICK); + textElement.addActionListener(FormEvent.ONCLICK); + link.addActionListener(FormEvent.ONCLICK); textElements.put(mat, textElement); //allow scripts... textElement.getEditorConfiguration().setInvalidElements(RichTextConfiguration.INVALID_ELEMENTS_FORM_FULL_VALUE_UNSAVE_WITH_SCRIPT); diff --git a/src/main/java/org/olat/ims/qti/editor/ItemMetadataFormController.java b/src/main/java/org/olat/ims/qti/editor/ItemMetadataFormController.java index 7a91eda310799c9dbe4dd0ffd05311e9a86db0c4..1dad46ca23a381705c8fd54e1870a1d0401e6822 100644 --- a/src/main/java/org/olat/ims/qti/editor/ItemMetadataFormController.java +++ b/src/main/java/org/olat/ims/qti/editor/ItemMetadataFormController.java @@ -216,7 +216,7 @@ public class ItemMetadataFormController extends FormBasicController { // Attempts limitAttempts = uifactory.addRadiosHorizontal("form.imd.limittries", formLayout, yesnoKeys, yesnoValues); - limitAttempts.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + limitAttempts.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 attempts = uifactory.addIntegerElement("form.imd.tries", 0, formLayout); attempts.setDisplaySize(3); if (item.getMaxattempts() > 0) { @@ -229,7 +229,7 @@ public class ItemMetadataFormController extends FormBasicController { // Time Limit limitTime = uifactory.addRadiosHorizontal("form.imd.limittime", formLayout, yesnoKeys, yesnoValues); - limitTime.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + limitTime.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 timeMin = uifactory.addIntegerElement("form.imd.time.min", 0, formLayout); timeMin.setDisplaySize(3); timeSec = uifactory.addIntegerElement("form.imd.time.sek", 0, formLayout); @@ -255,7 +255,7 @@ public class ItemMetadataFormController extends FormBasicController { // Hints Control itemControl = (Control) item.getItemcontrols().get(0); showHints = uifactory.addRadiosHorizontal("showHints", "form.imd.solutionhints.show", formLayout, yesnoKeys, yesnoValues); - showHints.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + showHints.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 hint = uifactory.addRichTextElementForStringData("hint", "form.imd.solutionhints", item.getQuestion().getHintText(), 8, -1, true, qti.getBaseDir(), null, formLayout, ureq.getUserSession(), getWindowControl()); @@ -270,7 +270,7 @@ public class ItemMetadataFormController extends FormBasicController { // Solution showSolution = uifactory.addRadiosHorizontal("showSolution", "form.imd.correctsolution.show", formLayout, yesnoKeys, yesnoValues); - showSolution.addActionListener(this, FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 + showSolution.addActionListener(FormEvent.ONCLICK); // Radios/Checkboxes need onclick because of IE bug OLAT-5753 boolean essay = (q.getType() == Question.TYPE_ESSAY); String solLabel = essay ? "form.imd.correctsolution.word" : "form.imd.correctsolution"; diff --git a/src/main/java/org/olat/instantMessaging/ui/IMPreferenceController.java b/src/main/java/org/olat/instantMessaging/ui/IMPreferenceController.java index a76ad60b84f2e367d62c7011fd263935d740aea7..26a7c666a31cb56746a804e870f2bc50c9330313 100644 --- a/src/main/java/org/olat/instantMessaging/ui/IMPreferenceController.java +++ b/src/main/java/org/olat/instantMessaging/ui/IMPreferenceController.java @@ -92,13 +92,13 @@ public class IMPreferenceController extends FormBasicController { toogleVisibility = uifactory.addCheckboxesVertical("online_list", "form.onlinelist", formLayout, new String[]{"xx"}, new String[]{null}, null, 1); toogleVisibility.select("xx", imPrefs.isVisibleToOthers()); - toogleVisibility.addActionListener(this, FormEvent.ONCHANGE); + toogleVisibility.addActionListener(FormEvent.ONCHANGE); statusList = uifactory.addRadiosVertical("status_list", "form.defaultstatus", formLayout, keys, values); if(StringHelper.containsNonWhitespace(imPrefs.getRosterDefaultStatus())) { statusList.select(imPrefs.getRosterDefaultStatus(), true); } - statusList.addActionListener(this, FormEvent.ONCHANGE); + statusList.addActionListener(FormEvent.ONCHANGE); } @Override diff --git a/src/main/java/org/olat/instantMessaging/ui/InstantMessagingAdminController.java b/src/main/java/org/olat/instantMessaging/ui/InstantMessagingAdminController.java index bd5fe9489f7e875c5442ce17cf101b3852a4021a..42b8e166abad930f516a2480faa9a6a6a749eb58 100644 --- a/src/main/java/org/olat/instantMessaging/ui/InstantMessagingAdminController.java +++ b/src/main/java/org/olat/instantMessaging/ui/InstantMessagingAdminController.java @@ -80,7 +80,7 @@ public class InstantMessagingAdminController extends FormBasicController { String[] enabledValues = new String[]{ translate("enabled") }; imEnabledEl = uifactory.addCheckboxesHorizontal("im.module.enabled", moduleFlc, enabledKeys, enabledValues, null); imEnabledEl.select(enabledKeys[0], imModule.isEnabled()); - imEnabledEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnabledEl.addActionListener(FormEvent.ONCHANGE); //options FormLayoutContainer chatOptionsFlc = FormLayoutContainer.createDefaultFormLayout("flc_chatOptions", getTranslator()); @@ -88,44 +88,44 @@ public class InstantMessagingAdminController extends FormBasicController { imEnableGroupEl = uifactory.addCheckboxesHorizontal("im.module.enabled.group", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableGroupEl.select(enabledKeys[0], imModule.isGroupEnabled()); - imEnableGroupEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableGroupEl.addActionListener(FormEvent.ONCHANGE); imEnableGroupAnonymEl = uifactory.addCheckboxesHorizontal("im.module.enabled.group.anonym", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableGroupAnonymEl.select(enabledKeys[0], imModule.isGroupAnonymEnabled()); - imEnableGroupAnonymEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableGroupAnonymEl.addActionListener(FormEvent.ONCHANGE); imEnableGroupAnonymDefaultEl = uifactory.addCheckboxesHorizontal("im.module.enabled.group.anonym.default", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableGroupAnonymDefaultEl.select(enabledKeys[0], imModule.isGroupAnonymDefaultEnabled()); - imEnableGroupAnonymDefaultEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableGroupAnonymDefaultEl.addActionListener(FormEvent.ONCHANGE); uifactory.addSpacerElement("spacer", chatOptionsFlc, true); imEnableCourseEl = uifactory.addCheckboxesHorizontal("im.module.enabled.course", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableCourseEl.select(enabledKeys[0], imModule.isCourseEnabled()); - imEnableCourseEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableCourseEl.addActionListener(FormEvent.ONCHANGE); imEnableCourseAnonymEl = uifactory.addCheckboxesHorizontal("im.module.enabled.course.anonym", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableCourseAnonymEl.select(enabledKeys[0], imModule.isCourseAnonymEnabled()); - imEnableCourseAnonymEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableCourseAnonymEl.addActionListener(FormEvent.ONCHANGE); imEnableCourseAnonymDefaultEl = uifactory.addCheckboxesHorizontal("im.module.enabled.course.anonym.default", chatOptionsFlc, enabledKeys, enabledValues, null); imEnableCourseAnonymDefaultEl.select(enabledKeys[0], imModule.isCourseAnonymDefaultEnabled()); - imEnableCourseAnonymDefaultEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableCourseAnonymDefaultEl.addActionListener(FormEvent.ONCHANGE); FormLayoutContainer messageOptionsFlc = FormLayoutContainer.createDefaultFormLayout("flc_messageOptions", getTranslator()); formLayout.add(messageOptionsFlc); imEnablePrivateEl = uifactory.addCheckboxesHorizontal("im.module.enabled.private", messageOptionsFlc, enabledKeys, enabledValues, null); imEnablePrivateEl.select(enabledKeys[0], imModule.isPrivateEnabled()); - imEnablePrivateEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnablePrivateEl.addActionListener(FormEvent.ONCHANGE); imEnableGroupPeersEl = uifactory.addCheckboxesHorizontal("im.module.enabled.grouppeers", messageOptionsFlc, enabledKeys, enabledValues, null); imEnableGroupPeersEl.select(enabledKeys[0], imModule.isGroupPeersEnabled()); - imEnableGroupPeersEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableGroupPeersEl.addActionListener(FormEvent.ONCHANGE); imEnableOnlineStatusEl = uifactory.addCheckboxesHorizontal("im.module.enabled.onlineStatus", messageOptionsFlc, enabledKeys, enabledValues, null); imEnableOnlineStatusEl.select(enabledKeys[0], imModule.isOnlineStatusEnabled()); - imEnableOnlineStatusEl.addActionListener(listener, FormEvent.ONCHANGE); + imEnableOnlineStatusEl.addActionListener(FormEvent.ONCHANGE); // update GUI dependencies updateDependencies(); diff --git a/src/main/java/org/olat/instantMessaging/ui/RosterForm.java b/src/main/java/org/olat/instantMessaging/ui/RosterForm.java index 52c114b2c932e7838149f856c41c30ec9e72db28..7b153875b4f53f351a82a35ce53f71cbc66af1fd 100644 --- a/src/main/java/org/olat/instantMessaging/ui/RosterForm.java +++ b/src/main/java/org/olat/instantMessaging/ui/RosterForm.java @@ -74,7 +74,7 @@ public class RosterForm extends FormBasicController { } else { toggle.select("name", true); } - toggle.addActionListener(this, FormEvent.ONCLICK); + toggle.addActionListener(FormEvent.ONCLICK); String nickName = generateNickname(); nickNameEl = uifactory.addTextElement("nickname", "", 20, nickName, formLayout); diff --git a/src/main/java/org/olat/ldap/ui/DeletStep00.java b/src/main/java/org/olat/ldap/ui/DeletStep00.java index ac43f31877c103a5bdf4fc6b06a44e2d71832457..4ddbb8af280ce448ec6857afefcb34a2faf2ad95 100644 --- a/src/main/java/org/olat/ldap/ui/DeletStep00.java +++ b/src/main/java/org/olat/ldap/ui/DeletStep00.java @@ -138,9 +138,9 @@ public class DeletStep00 extends BasicStep{ multiSelectTree = uifactory.addTreeMultiselect("seltree", null, formLayout, deleteIdentityTreeModel, deleteIdentityTreeModel); selectAllLink = uifactory.addFormLink("checkall", formLayout); - selectAllLink.addActionListener(this, FormEvent.ONCLICK); + selectAllLink.addActionListener(FormEvent.ONCLICK); uncheckallLink = uifactory.addFormLink("uncheckall", formLayout); - uncheckallLink.addActionListener(this, FormEvent.ONCLICK); + uncheckallLink.addActionListener(FormEvent.ONCLICK); } } diff --git a/src/main/java/org/olat/modules/co/ContactForm.java b/src/main/java/org/olat/modules/co/ContactForm.java index fe96d263237b9420b949723348e4c315d0bfa7e5..c11679cfb1bd87864ab3be5837b9fdd2d88059d3 100644 --- a/src/main/java/org/olat/modules/co/ContactForm.java +++ b/src/main/java/org/olat/modules/co/ContactForm.java @@ -395,7 +395,7 @@ public class ContactForm extends FormBasicController { attachmentEl = uifactory.addFileElement("file_upload_1", NLS_CONTACT_ATTACHMENT, formLayout); attachmentEl.setLabel(NLS_CONTACT_ATTACHMENT, null); - attachmentEl.addActionListener(this, FormEvent.ONCHANGE); + attachmentEl.addActionListener(FormEvent.ONCHANGE); attachmentEl.setExampleKey(NLS_CONTACT_ATTACHMENT_EXPL, new String[]{Integer.toString(contactAttachmentMaxSizeInMb)}); diff --git a/src/main/java/org/olat/modules/cp/CPSelectPrintPagesController.java b/src/main/java/org/olat/modules/cp/CPSelectPrintPagesController.java index 329ac5af47993ea6605635678bc71d9362ae363e..81d7faf7ecc991ba626a473947caf6f2eec218cd 100644 --- a/src/main/java/org/olat/modules/cp/CPSelectPrintPagesController.java +++ b/src/main/java/org/olat/modules/cp/CPSelectPrintPagesController.java @@ -100,7 +100,7 @@ public class CPSelectPrintPagesController extends FormBasicController { MultipleSelectionElement nodeSelection = uifactory.addCheckboxesVertical("print.node.list." + nodeSelections.size(), layoutcont, singleKey, singleValue, cssClass, 1); nodeSelection.setLabel("print.node.list", null); nodeSelection.setUserObject(new SelectNodeObject(node, level)); - nodeSelection.addActionListener(this, FormEvent.ONCLICK); + nodeSelection.addActionListener(FormEvent.ONCLICK); nodeSelection.select(node.getIdent(), true); nodeSelections.add(nodeSelection); identToSelectionMap.put(node.getIdent(), nodeSelection); diff --git a/src/main/java/org/olat/modules/fo/ForumThreadViewModeController.java b/src/main/java/org/olat/modules/fo/ForumThreadViewModeController.java index 148952094f15abbe1c762004135e5b652aa9071f..c97a1f3086afc117996b8051dde49788c4c9a630 100644 --- a/src/main/java/org/olat/modules/fo/ForumThreadViewModeController.java +++ b/src/main/java/org/olat/modules/fo/ForumThreadViewModeController.java @@ -91,7 +91,7 @@ public class ForumThreadViewModeController extends FormBasicController { String[] viewValues = new String[] { translate("viewswitch.threadview"), translate("viewswitch.flatview"), translate("viewswitch.messageview"), translate("viewswitch.marked"), translate("viewswitch.new") }; viewRadio = uifactory.addRadiosHorizontal("viewswitch.title", formLayout, viewKeys, viewValues); - viewRadio.addActionListener(listener, FormEvent.ONCLICK); + viewRadio.addActionListener(FormEvent.ONCLICK); // preselect according to user-settings if(startingViewMode == null) { diff --git a/src/main/java/org/olat/modules/fo/MessageEditController.java b/src/main/java/org/olat/modules/fo/MessageEditController.java index ba46df0803421fb92f98c6387502fd52d65a4c96..cea932963d01ae71a255e9b65616a26fc92e81b6 100644 --- a/src/main/java/org/olat/modules/fo/MessageEditController.java +++ b/src/main/java/org/olat/modules/fo/MessageEditController.java @@ -167,7 +167,7 @@ public class MessageEditController extends FormBasicController { // provide upload field if (forumCallback.mayEditMessageAsModerator() || ((userIsMsgCreator) && (msgHasChildren == false))) { fileUpload = uifactory.addFileElement("msg.upload", formLayout); - fileUpload.addActionListener(listener, FormEvent.ONCHANGE); + fileUpload.addActionListener(FormEvent.ONCHANGE); fileUpload.setMaxUploadSizeKB((int) FolderConfig.getLimitULKB(), "attachments.too.big", new String[] { ((Long) (FolderConfig .getLimitULKB() / 1024)).toString() }); } diff --git a/src/main/java/org/olat/modules/glossary/GlossaryEditSettingsController.java b/src/main/java/org/olat/modules/glossary/GlossaryEditSettingsController.java index 1747a2fe61cc2dc479bdb5e607b5ed4faaf4990b..329b2442264ace056afa6c2a8d80de253ec6bea2 100644 --- a/src/main/java/org/olat/modules/glossary/GlossaryEditSettingsController.java +++ b/src/main/java/org/olat/modules/glossary/GlossaryEditSettingsController.java @@ -67,7 +67,7 @@ public class GlossaryEditSettingsController extends FormBasicController { String[] regValues = {""}; editByUserEnabled = uifactory.addCheckboxesHorizontal("edit.onoff", formLayout, regKeys, regValues, null); - editByUserEnabled.addActionListener(listener, FormEvent.ONCLICK); + editByUserEnabled.addActionListener(FormEvent.ONCLICK); Properties glossProps = GlossaryItemManager.getInstance().getGlossaryConfig(glossaryFolder); String configuredStatus = glossProps.getProperty(GlossaryItemManager.EDIT_USERS); diff --git a/src/main/java/org/olat/modules/glossary/GlossaryRegisterSettingsController.java b/src/main/java/org/olat/modules/glossary/GlossaryRegisterSettingsController.java index a5c8a033a380e272847f2e5bc08fbf531a5f5b29..71fb76fbc07226797f66be6aa057352e359c6e9e 100644 --- a/src/main/java/org/olat/modules/glossary/GlossaryRegisterSettingsController.java +++ b/src/main/java/org/olat/modules/glossary/GlossaryRegisterSettingsController.java @@ -97,7 +97,7 @@ public class GlossaryRegisterSettingsController extends FormBasicController { String[] regCSS = new String[1]; regOnOff = uifactory.addCheckboxesHorizontal("register.onoff", formLayout, regKeys, regValues, regCSS); - regOnOff.addActionListener(listener, FormEvent.ONCLICK); + regOnOff.addActionListener(FormEvent.ONCLICK); Properties glossProps = GlossaryItemManager.getInstance().getGlossaryConfig(glossaryFolder); String configuredStatus = glossProps.getProperty(GlossaryItemManager.REGISTER_ONOFF); diff --git a/src/main/java/org/olat/modules/openmeetings/ui/OpenMeetingsConfigurationController.java b/src/main/java/org/olat/modules/openmeetings/ui/OpenMeetingsConfigurationController.java index c0f60cdc74547dea2472261158e3c180fcba89b3..c93f752a7bcd9fa79019d8359f26f4ab0f627cad 100644 --- a/src/main/java/org/olat/modules/openmeetings/ui/OpenMeetingsConfigurationController.java +++ b/src/main/java/org/olat/modules/openmeetings/ui/OpenMeetingsConfigurationController.java @@ -85,7 +85,7 @@ public class OpenMeetingsConfigurationController extends FormBasicController { moduleEnabled = uifactory.addCheckboxesHorizontal("openmeetings.module.enabled", moduleFlc, enabledKeys, enabledValues, null); moduleEnabled.select(enabledKeys[0], openMeetingsModule.isEnabled()); - moduleEnabled.addActionListener(listener, FormEvent.ONCHANGE); + moduleEnabled.addActionListener(FormEvent.ONCHANGE); //spacer uifactory.addSpacerElement("Spacer", moduleFlc, false); diff --git a/src/main/java/org/olat/modules/qpool/ui/metadata/ExtendedSearchController.java b/src/main/java/org/olat/modules/qpool/ui/metadata/ExtendedSearchController.java index d96c9855cbca0e750307c82da2d9fe3c9746cc87..989f649f2a22518e3fa3fecc22d7d5f04715d59b 100644 --- a/src/main/java/org/olat/modules/qpool/ui/metadata/ExtendedSearchController.java +++ b/src/main/java/org/olat/modules/qpool/ui/metadata/ExtendedSearchController.java @@ -222,7 +222,7 @@ public class ExtendedSearchController extends FormBasicController implements Ext } else { selectAttributeType(pref.getAttribute(), pref.getValue()); } - attributeChoice.addActionListener(ExtendedSearchController.this, FormEvent.ONCHANGE); + attributeChoice.addActionListener(FormEvent.ONCHANGE); attributeChoice.setUserObject(this); flc.add(attributeChoice.getName(), attributeChoice); addButton = uifactory.addFormLink("add-" + id, "add", null, flc, Link.BUTTON); diff --git a/src/main/java/org/olat/modules/qpool/ui/metadata/MetadataBulkChangeController.java b/src/main/java/org/olat/modules/qpool/ui/metadata/MetadataBulkChangeController.java index 81e2972d5c66b753e62af323fc4d936f217771d5..64e3fff27ef0652e93d50b689e0d9078cc2faf49 100644 --- a/src/main/java/org/olat/modules/qpool/ui/metadata/MetadataBulkChangeController.java +++ b/src/main/java/org/olat/modules/qpool/ui/metadata/MetadataBulkChangeController.java @@ -273,7 +273,7 @@ public class MetadataBulkChangeController extends FormBasicController { licenseKeys = getQLicenseKeyValues(qpoolService); copyrightEl = uifactory.addDropdownSingleselect("rights.copyright.sel", "rights.copyright", rightsWrapperCont, licenseKeys.getKeys(), licenseKeys.getValues(), null); - copyrightEl.addActionListener(this, FormEvent.ONCHANGE); + copyrightEl.addActionListener(FormEvent.ONCHANGE); copyrightEl.select("none", true); descriptionEl = uifactory.addTextAreaElement("rights.description", "rights.description", 1000, 6, 40, true, null, rightsWrapperCont); @@ -283,7 +283,7 @@ public class MetadataBulkChangeController extends FormBasicController { String itemName = item.getName(); MultipleSelectionElement checkbox = uifactory.addCheckboxesVertical("cbx_" + itemName, itemName, formLayout, new String[] { itemName }, EMPTY_VALUES, null, 1); checkbox.select(itemName, false); - checkbox.addActionListener(listener, FormEvent.ONCLICK); + checkbox.addActionListener(FormEvent.ONCLICK); checkbox.setUserObject(item); checkboxSwitch.add(checkbox); diff --git a/src/main/java/org/olat/modules/qpool/ui/metadata/RightsMetadataEditController.java b/src/main/java/org/olat/modules/qpool/ui/metadata/RightsMetadataEditController.java index 5321f101ed9fb2b3e38469aacb673071666b58c1..88deedfeaf73b9577204175daa7d5f918ed852ed 100644 --- a/src/main/java/org/olat/modules/qpool/ui/metadata/RightsMetadataEditController.java +++ b/src/main/java/org/olat/modules/qpool/ui/metadata/RightsMetadataEditController.java @@ -106,7 +106,7 @@ public class RightsMetadataEditController extends FormBasicController { copyrightEl = uifactory.addDropdownSingleselect("rights.copyright", "rights.copyright", formLayout, licenseKeys.getKeys(), licenseKeys.getValues(), null); - copyrightEl.addActionListener(this, FormEvent.ONCHANGE); + copyrightEl.addActionListener(FormEvent.ONCHANGE); String description; QLicense copyright = item.getLicense(); if(copyright == null) { diff --git a/src/main/java/org/olat/modules/vitero/ui/ViteroConfigurationController.java b/src/main/java/org/olat/modules/vitero/ui/ViteroConfigurationController.java index 33cccd84c17bf97332b9919e72ded35b1accd467..c345101348d205b8026b62231478242ba8ce4969 100644 --- a/src/main/java/org/olat/modules/vitero/ui/ViteroConfigurationController.java +++ b/src/main/java/org/olat/modules/vitero/ui/ViteroConfigurationController.java @@ -91,7 +91,7 @@ public class ViteroConfigurationController extends FormBasicController { viteroEnabled = uifactory.addCheckboxesHorizontal("vitero.module.enabled", moduleFlc, enabledKeys, enabledValues, null); viteroEnabled.select(enabledKeys[0], viteroModule.isEnabled()); - viteroEnabled.addActionListener(listener, FormEvent.ONCHANGE); + viteroEnabled.addActionListener(FormEvent.ONCHANGE); //spacer uifactory.addSpacerElement("Spacer", moduleFlc, false); diff --git a/src/main/java/org/olat/modules/webFeed/ui/DisplayFeedUrlController.java b/src/main/java/org/olat/modules/webFeed/ui/DisplayFeedUrlController.java index a1ed9d5456a0ee53602f2bd254fcbed8ce069ad4..72d5e78b6083371b7ed21fa4918a3498f3d7af35 100644 --- a/src/main/java/org/olat/modules/webFeed/ui/DisplayFeedUrlController.java +++ b/src/main/java/org/olat/modules/webFeed/ui/DisplayFeedUrlController.java @@ -101,7 +101,7 @@ public class DisplayFeedUrlController extends FormBasicController { feedUrl = uifactory.addTextAreaElement("feedUrl", "feed.url.label", 5000, 1, 1, true, helper.getFeedUrl(), this.flc); // no editing. selecting allowed only feedUrl.setEnabled(false); - feedUrl.addActionListener(this, FormEvent.ONCLICK); + feedUrl.addActionListener(FormEvent.ONCLICK); } /** diff --git a/src/main/java/org/olat/modules/webFeed/ui/FeedFormController.java b/src/main/java/org/olat/modules/webFeed/ui/FeedFormController.java index d5986a82f84327e15d6b94cba72cd956a0a4f5c7..672163b0d649f71ffb05d6c767aaf16156b52c61 100644 --- a/src/main/java/org/olat/modules/webFeed/ui/FeedFormController.java +++ b/src/main/java/org/olat/modules/webFeed/ui/FeedFormController.java @@ -278,7 +278,7 @@ class FeedFormController extends FormBasicController { imageContainer.put("image", image); file = uifactory.addFileElement("feed.file.label", this.flc); - file.addActionListener(this, FormEvent.ONCHANGE); + file.addActionListener(FormEvent.ONCHANGE); if (feed.getImageName() != null) { MediaResource imageResource = FeedManager.getInstance().createFeedMediaFile(feed, feed.getImageName()); diff --git a/src/main/java/org/olat/modules/webFeed/ui/blog/BlogPostFormController.java b/src/main/java/org/olat/modules/webFeed/ui/blog/BlogPostFormController.java index 317dffc0309438b19a649d7eae5bf681cb9e80ee..3ca298dae2aeb26d01721d4e12499515895927ef 100644 --- a/src/main/java/org/olat/modules/webFeed/ui/blog/BlogPostFormController.java +++ b/src/main/java/org/olat/modules/webFeed/ui/blog/BlogPostFormController.java @@ -194,7 +194,7 @@ public class BlogPostFormController extends FormBasicController { uifactory.addFormSubmitButton("feed.publish", buttonLayout); draftLink = uifactory.addFormLink("feed.save.as.draft", buttonLayout, Link.BUTTON); - draftLink.addActionListener(this, FormEvent.ONCLICK); + draftLink.addActionListener(FormEvent.ONCLICK); uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl()); } } diff --git a/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java b/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java index b814301f558e1737256a1219c4d2c16d279327bd..5fb7dbb02f1eceb3b1f7ffea1a86dfb6c670eb35 100644 --- a/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java +++ b/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java @@ -263,7 +263,7 @@ public class EpisodeFormController extends FormBasicController { file.setMandatory(true, "podcast.episode.mandatory"); File mediaFile = FeedManager.getInstance().getItemEnclosureFile(episode, podcast); file.setInitialFile(mediaFile); - file.addActionListener(this, FormEvent.ONCHANGE); + file.addActionListener(FormEvent.ONCHANGE); if(baseDir.getLocalSecurityCallback() != null && baseDir.getLocalSecurityCallback().getQuota() != null) { Long uploadLimitKB = baseDir.getLocalSecurityCallback().getQuota().getUlLimitKB(); String supportAddr = WebappHelper.getMailConfig("mailQuota"); diff --git a/src/main/java/org/olat/portfolio/ui/EPViewModeController.java b/src/main/java/org/olat/portfolio/ui/EPViewModeController.java index f2e8b485f7d78bff25c46f661ecc137b2b72a39f..fda1c208305b08684b39f62643c6df8c2de53274 100644 --- a/src/main/java/org/olat/portfolio/ui/EPViewModeController.java +++ b/src/main/java/org/olat/portfolio/ui/EPViewModeController.java @@ -82,7 +82,7 @@ public class EPViewModeController extends FormBasicController { String[] theValues = new String[]{translate("view.mode.table"), translate("view.mode.details")}; viewRadio = uifactory.addRadiosHorizontal("view.mode", formLayout, theKeys, theValues); - viewRadio.addActionListener(this, FormEvent.ONCLICK); + viewRadio.addActionListener(FormEvent.ONCLICK); if (userPrefsMode != null) viewRadio.select(userPrefsMode, true); else viewRadio.select(VIEWMODE_DETAILS, true); } diff --git a/src/main/java/org/olat/portfolio/ui/PortfolioAdminController.java b/src/main/java/org/olat/portfolio/ui/PortfolioAdminController.java index 3923cc36c2c11fb32853b20801158d0318029472..317a74dd5e40227d01cfbe5bfa1209d84d6afd14 100644 --- a/src/main/java/org/olat/portfolio/ui/PortfolioAdminController.java +++ b/src/main/java/org/olat/portfolio/ui/PortfolioAdminController.java @@ -82,7 +82,7 @@ public class PortfolioAdminController extends FormBasicController { portfolioEnabled = uifactory.addCheckboxesHorizontal("portfolio.module.enabled", moduleFlc, enabledKeys, enabledValues, null); portfolioEnabled.select(enabledKeys[0], portfolioModule.isEnabled()); - portfolioEnabled.addActionListener(listener, FormEvent.ONCHANGE); + portfolioEnabled.addActionListener(FormEvent.ONCHANGE); //handlers configuration FormLayoutContainer handlersFlc = FormLayoutContainer.createDefaultFormLayout("flc_handlers", getTranslator()); @@ -96,7 +96,7 @@ public class PortfolioAdminController extends FormBasicController { MultipleSelectionElement handlerEnabled = uifactory.addCheckboxesHorizontal(handlerClass, handlersFlc, enabledKeys, enabledValues, null); handlerEnabled.select(enabledKeys[0], handler.isEnabled()); handlerEnabled.setUserObject(handler); - handlerEnabled.addActionListener(listener, FormEvent.ONCHANGE); + handlerEnabled.addActionListener(FormEvent.ONCHANGE); handlersEnabled.add(handlerEnabled); } @@ -105,11 +105,11 @@ public class PortfolioAdminController extends FormBasicController { layoutContainer.add(wizardFlc); copyrightStepCB = uifactory.addCheckboxesHorizontal("wizard.step.copyright", wizardFlc, enabledKeys, enabledValues, null); copyrightStepCB.select(enabledKeys[0], portfolioModule.isCopyrightStepEnabled()); - copyrightStepCB.addActionListener(listener, FormEvent.ONCHANGE); + copyrightStepCB.addActionListener(FormEvent.ONCHANGE); reflexionStepCB = uifactory.addCheckboxesHorizontal("wizard.step.reflexion", wizardFlc, enabledKeys, enabledValues, null); reflexionStepCB.select(enabledKeys[0], portfolioModule.isReflexionStepEnabled()); - reflexionStepCB.addActionListener(listener, FormEvent.ONCHANGE); + reflexionStepCB.addActionListener(FormEvent.ONCHANGE); } diff --git a/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm02.java b/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm02.java index d7e448c25f65561f068901681e4b44f2e194c8ff..8e598e87a46d20fb3a924fe5df1b942dc59a4f6c 100644 --- a/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm02.java +++ b/src/main/java/org/olat/portfolio/ui/artefacts/collect/EPCollectStepForm02.java @@ -71,7 +71,7 @@ public class EPCollectStepForm02 extends StepFormBasicController { if (artefact.getSignature() > 0 ){ crCheck.select(Boolean.TRUE.toString(), true); } - crCheck.addActionListener(this, FormEvent.ONCHANGE); + crCheck.addActionListener(FormEvent.ONCHANGE); } /** diff --git a/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactAttributeSettingController.java b/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactAttributeSettingController.java index fac8e30b4b1150f1cf2eaaf3dccbf1d64fe37fe2..660c0b5b8be23bc51d9b0a873769b0a436d1ef3c 100644 --- a/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactAttributeSettingController.java +++ b/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactAttributeSettingController.java @@ -69,7 +69,7 @@ public class EPArtefactAttributeSettingController extends FormBasicController { String attKey = entry.getKey(); Boolean attVal = artAttribConfig.get(attKey); MultipleSelectionElement chkBox = uifactory.addCheckboxesHorizontal(attKey, formLayout, keys, values, null); - chkBox.addActionListener(this, FormEvent.ONCHANGE ); + chkBox.addActionListener(FormEvent.ONCHANGE ); if (attVal == null) attVal = entry.getValue(); // either use users settings or the defaults chkBox.select(keys[0], attVal); } diff --git a/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactViewController.java b/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactViewController.java index 6945b4d9a2c1f9aebeb92a870a52986866dfa4f3..8f83a36c183b0808596a3a0a3550261341862890 100644 --- a/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactViewController.java +++ b/src/main/java/org/olat/portfolio/ui/artefacts/view/EPArtefactViewController.java @@ -195,7 +195,7 @@ public class EPArtefactViewController extends FormBasicController { tblE.setEnabled(false); } else { flc.contextPut("tagclass", "b_tag_list"); - //tblE.addActionListener(this, FormEvent.ONCHANGE); + //tblE.addActionListener(FormEvent.ONCHANGE); Map<String, String> allUsersTags = ePFMgr.getUsersMostUsedTags(getIdentity(), -1); tblE.setAutoCompleteContent(allUsersTags); } @@ -227,7 +227,7 @@ public class EPArtefactViewController extends FormBasicController { // create a delete button deleteBtn = uifactory.addFormLink("delete.artefact", formLayout, "b_with_small_icon_left b_delete_icon"); - deleteBtn.addActionListener(this, FormEvent.ONCLICK); + deleteBtn.addActionListener(FormEvent.ONCLICK); if (viewOnlyMode || artefactChooseMode || artefactInClosedMap) deleteBtn.setVisible(false); // let the artefact-handler paint what is special for this kind of artefact @@ -263,7 +263,7 @@ public class EPArtefactViewController extends FormBasicController { // if in artefactChooseMode, add an "choose this" button if(artefactChooseMode) { chooseBtn = uifactory.addFormLink("choose.artefact", formLayout); - chooseBtn.addActionListener(this, FormEvent.ONCLICK); + chooseBtn.addActionListener(FormEvent.ONCLICK); } flc.contextPut("artefact", artefact); diff --git a/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTagSelectionController.java b/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTagSelectionController.java index 5243d8916a661703818f20d7964c9b368e1bca4d..b25096fbbdcf98ef5cc53a4282773404f9cb4d66 100644 --- a/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTagSelectionController.java +++ b/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTagSelectionController.java @@ -86,7 +86,7 @@ public class EPArtefactTagSelectionController extends FormBasicController { String[] selectedKeys = selectedTagsList.toArray(new String[0]); chkBox.setSelectedValues(selectedKeys); } - chkBox.addActionListener(this, FormEvent.ONCHANGE); + chkBox.addActionListener(FormEvent.ONCHANGE); uifactory.addFormSubmitButton("filter.type.submit", formLayout); } diff --git a/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTypeSelectionController.java b/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTypeSelectionController.java index 9088b2f301f87414aabc57b81b43511db21c45d1..61934ea43395961b7e8f74ed4df495f30f7f62da 100644 --- a/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTypeSelectionController.java +++ b/src/main/java/org/olat/portfolio/ui/filter/EPArtefactTypeSelectionController.java @@ -81,7 +81,7 @@ public class EPArtefactTypeSelectionController extends FormBasicController { if (selectedTypeList != null && selectedTypeList.contains(handler.getType())) { chkBox.select(keys[0], true); } - chkBox.addActionListener(this, FormEvent.ONCHANGE); + chkBox.addActionListener(FormEvent.ONCHANGE); chkBox.setUserObject(handler.getType()); typeCmpList.add(chkBox); } diff --git a/src/main/java/org/olat/portfolio/ui/filter/EPFilterSelectController.java b/src/main/java/org/olat/portfolio/ui/filter/EPFilterSelectController.java index 0eace5d0f709675dc243a32e2c12f288c8116b88..62913202926c8ba94cf061ed794213fac56f8f70 100644 --- a/src/main/java/org/olat/portfolio/ui/filter/EPFilterSelectController.java +++ b/src/main/java/org/olat/portfolio/ui/filter/EPFilterSelectController.java @@ -101,7 +101,7 @@ public class EPFilterSelectController extends FormBasicController { formLayout.add(selection); filterSel = uifactory.addDropdownSingleselect("filter.select", selection, theKeys, theValues, null); - filterSel.addActionListener(this, FormEvent.ONCHANGE); + filterSel.addActionListener(FormEvent.ONCHANGE); filterSel.select(presetFilterIndex, true); adaptBtn = uifactory.addFormLink("filter.adapt", selection); adaptBtn.setVisible(!presetFilterIndex.equals("0")); diff --git a/src/main/java/org/olat/portfolio/ui/filter/PortfolioFilterController.java b/src/main/java/org/olat/portfolio/ui/filter/PortfolioFilterController.java index 847d697ea10a4cf2924c22e49f889e146f0b020e..266b46a3eabe89fd69898d3df7541d6f340e9d5d 100644 --- a/src/main/java/org/olat/portfolio/ui/filter/PortfolioFilterController.java +++ b/src/main/java/org/olat/portfolio/ui/filter/PortfolioFilterController.java @@ -159,9 +159,9 @@ public class PortfolioFilterController extends FormBasicController { formLayout.add(dateFlc); dateFlc.setLabel("filter.by.date", null); dateStart = uifactory.addDateChooser("filter.date.start", null, dateFlc); - dateStart.addActionListener(this, FormEvent.ONCHANGE); + dateStart.addActionListener(FormEvent.ONCHANGE); dateEnd = uifactory.addDateChooser("filter.date.end", null, dateFlc); - dateEnd.addActionListener(listener, FormEvent.ONCHANGE); + dateEnd.addActionListener(FormEvent.ONCHANGE); dateStart.clearError(); dateEnd.clearError(); } @@ -178,7 +178,7 @@ public class PortfolioFilterController extends FormBasicController { String searchText = filterSettings.getTextFilter(); if(formLayout.getFormComponent("search") == null) { searchFld = uifactory.addTextElement("search", "filter.search", 20, searchText, formLayout); - searchFld.addActionListener(listener, FormEvent.ONCHANGE); + searchFld.addActionListener(FormEvent.ONCHANGE); } else { searchFld.setValue(searchText); } @@ -246,7 +246,7 @@ public class PortfolioFilterController extends FormBasicController { if (!nonEmptyFilters.isEmpty()) { if(formLayout.getFormComponent("filter.select") == null) { filterSel = uifactory.addDropdownSingleselect("filter.select", formLayout, theKeys, theValues, null); - filterSel.addActionListener(this, FormEvent.ONCHANGE); + filterSel.addActionListener(FormEvent.ONCHANGE); } else { filterSel.setKeysAndValues(theKeys, theValues, null); filterSel.setVisible(true); diff --git a/src/main/java/org/olat/portfolio/ui/structel/EPShareListController.java b/src/main/java/org/olat/portfolio/ui/structel/EPShareListController.java index 1f4236161422fcb38d46944dba76cec6b2d6a6b0..434d1440d192405cc0318f17f6a88483df8f9dc3 100644 --- a/src/main/java/org/olat/portfolio/ui/structel/EPShareListController.java +++ b/src/main/java/org/olat/portfolio/ui/structel/EPShareListController.java @@ -497,7 +497,7 @@ public class EPShareListController extends FormBasicController { if(policyWrapper.getType() != null) { SingleSelection type = uifactory.addDropdownSingleselect("map.share.target." + cmpName, "map.share.target", container, targetKeys, targetValues, null); - type.addActionListener(this, FormEvent.ONCHANGE); + type.addActionListener(FormEvent.ONCHANGE); type.setUserObject(policyWrapper); type.select(policyWrapper.getType().name(), true); switch(policyWrapper.getType()) { diff --git a/src/main/java/org/olat/portfolio/ui/structel/edit/EPStructureTreeAndDetailsEditController.java b/src/main/java/org/olat/portfolio/ui/structel/edit/EPStructureTreeAndDetailsEditController.java index ad1fae8274998a86a3365db3236a9a18e0aa785e..423cf7518b9c3722fd7cb51f9bb5d11be1db1754 100644 --- a/src/main/java/org/olat/portfolio/ui/structel/edit/EPStructureTreeAndDetailsEditController.java +++ b/src/main/java/org/olat/portfolio/ui/structel/edit/EPStructureTreeAndDetailsEditController.java @@ -102,7 +102,7 @@ public class EPStructureTreeAndDetailsEditController extends FormBasicController i++; } mapStyle = uifactory.addDropdownSingleselect("map.style", formLayout, theKeys, theValues, theCssClasses); - mapStyle.addActionListener(this, FormEvent.ONCHANGE); + mapStyle.addActionListener(FormEvent.ONCHANGE); String givenStyle = ((EPStructureElement)rootStructure).getStyle(); if (StringHelper.containsNonWhitespace(givenStyle)){ mapStyle.select(givenStyle, true); diff --git a/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java b/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java index e507435269ebab5c77f354298c5ea08d902c8d17..51d9f19b53b6df30e3f6b968bedbb852b08ff0cd 100644 --- a/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java +++ b/src/main/java/org/olat/portfolio/ui/structel/view/EPChangelogController.java @@ -99,7 +99,7 @@ public class EPChangelogController extends FormBasicController { /* the datechooser */ dateChooser = uifactory.addDateChooser("dateChooser", "news.since", null, formLayout); dateChooser.setDate(new Date()); - dateChooser.addActionListener(this, FormEvent.ONCHANGE); + dateChooser.addActionListener(FormEvent.ONCHANGE); /* display the changelog */ updateChangelogDisplay(ureq); diff --git a/src/main/java/org/olat/registration/LanguageChooserController.java b/src/main/java/org/olat/registration/LanguageChooserController.java index 44d0c4144af2169be11348fb2bad0baf449c2296..6a645c06ff34c23734762940f7f974796d199aa9 100644 --- a/src/main/java/org/olat/registration/LanguageChooserController.java +++ b/src/main/java/org/olat/registration/LanguageChooserController.java @@ -138,7 +138,7 @@ public class LanguageChooserController extends FormBasicController { final FormLayoutContainer langLayout = FormLayoutContainer.createCustomFormLayout("langLayout", getTranslator(), velocity_root + "/langchooser.html"); formLayout.add(langLayout); langs = uifactory.addDropdownSingleselect("select.language", langLayout, langKeys, langValues, langCssClasses); - langs.addActionListener(this, FormEvent.ONCHANGE); + langs.addActionListener(FormEvent.ONCHANGE); langs.select(curlang, true); Locale loc = I18nManager.getInstance().getLocaleOrDefault(curlang); langLayout.contextPut("languageCode", loc.toString()); diff --git a/src/main/java/org/olat/registration/RegistrationAdminController.java b/src/main/java/org/olat/registration/RegistrationAdminController.java index 102598131bd6315cd2948f20b0b0683b5e33aefb..5ea143e4aaa5e4312665af7258f1576a82d8eab2 100644 --- a/src/main/java/org/olat/registration/RegistrationAdminController.java +++ b/src/main/java/org/olat/registration/RegistrationAdminController.java @@ -111,15 +111,15 @@ public class RegistrationAdminController extends FormBasicController { formLayout.add(settingsContainer); registrationElement = uifactory.addCheckboxesHorizontal("enable.self.registration", "admin.enableRegistration", settingsContainer, enableRegistrationKeys, enableRegistrationValues, null); - registrationElement.addActionListener(this, FormEvent.ONCHANGE); + registrationElement.addActionListener(FormEvent.ONCHANGE); registrationElement.select("on", registrationModule.isSelfRegistrationEnabled()); registrationLoginElement = uifactory.addCheckboxesHorizontal("enable.registration.login", "admin.enableRegistrationLogin", settingsContainer, enableRegistrationKeys, enableRegistrationValues, null); - registrationLoginElement.addActionListener(this, FormEvent.ONCHANGE); + registrationLoginElement.addActionListener(FormEvent.ONCHANGE); registrationLoginElement.select("on", registrationModule.isSelfRegistrationLoginEnabled()); registrationLinkElement = uifactory.addCheckboxesHorizontal("enable.registration.link", "admin.enableRegistrationLink", settingsContainer, enableRegistrationKeys, enableRegistrationValues, null); - registrationLinkElement.addActionListener(this, FormEvent.ONCHANGE); + registrationLinkElement.addActionListener(FormEvent.ONCHANGE); registrationLinkElement.select("on", registrationModule.isSelfRegistrationLinkEnabled()); String example = generateExampleCode(); @@ -144,7 +144,7 @@ public class RegistrationAdminController extends FormBasicController { uifactory.addStaticTextElement("admin.registration.staticprop.error", null, translate("admin.registration.staticprop.desc"), staticPropContainer); staticPropElement = uifactory.addCheckboxesHorizontal("enable.staticprop", "admin.enableStaticProp", staticPropContainer, enableRegistrationKeys, enableRegistrationValues, null); - staticPropElement.addActionListener(this, FormEvent.ONCHANGE); + staticPropElement.addActionListener(FormEvent.ONCHANGE); staticPropElement.select("on", registrationModule.isStaticPropertyMappingEnabled()); propertyElement = uifactory.addDropdownSingleselect("property", "admin.registration.property", staticPropContainer, propertyKeys, propertyValues, null); @@ -153,7 +153,7 @@ public class RegistrationAdminController extends FormBasicController { if(handler != null) { propertyElement.select(handler.getName(), true); } - propertyElement.addActionListener(this, FormEvent.ONCHANGE); + propertyElement.addActionListener(FormEvent.ONCHANGE); String propertyValue = registrationModule.getStaticPropertyMappingValue(); propertyValueElement = uifactory.addTextElement("admin.registration.prop.value", "admin.registration.propertyValue", 255, propertyValue, staticPropContainer); diff --git a/src/main/java/org/olat/repository/SearchForm.java b/src/main/java/org/olat/repository/SearchForm.java index bf8f2740926c0fb8cdc6a49ddd03ff17064be351..79dfdf8d260c8c61bc52099c5c38d997d1235569 100644 --- a/src/main/java/org/olat/repository/SearchForm.java +++ b/src/main/java/org/olat/repository/SearchForm.java @@ -270,7 +270,7 @@ public class SearchForm extends FormBasicController{ externalRef.setVisible(managedEnabled); typesSelection = uifactory.addCheckboxesVertical("search.limit.type", formLayout, new String[]{"xx"}, new String[]{""}, new String[]{null}, 1); - typesSelection.addActionListener(listener, FormEvent.ONCLICK); + typesSelection.addActionListener(FormEvent.ONCLICK); typesSelection.setElementCssClass("o_sel_repo_search_type_limit"); String[] typeKeys = getResources().toArray(new String[0]); diff --git a/src/main/java/org/olat/repository/controllers/RepositoryEditDescriptionController.java b/src/main/java/org/olat/repository/controllers/RepositoryEditDescriptionController.java index 7a9cfa1e2324ae59b209b12dce43319d0a31a6ba..63999bd56d71b5b7212c7667acec6ee045224e13 100644 --- a/src/main/java/org/olat/repository/controllers/RepositoryEditDescriptionController.java +++ b/src/main/java/org/olat/repository/controllers/RepositoryEditDescriptionController.java @@ -187,7 +187,7 @@ public class RepositoryEditDescriptionController extends FormBasicController { } else { dateTypesEl.select("public", true); } - dateTypesEl.addActionListener(this, FormEvent.ONCHANGE); + dateTypesEl.addActionListener(FormEvent.ONCHANGE); List<RepositoryEntryLifecycle> cycles = lifecycleDao.loadPublicLifecycle(); String[] publicKeys = new String[cycles.size()]; @@ -250,7 +250,7 @@ public class RepositoryEditDescriptionController extends FormBasicController { fileUpload.setLabel(null, null); } fileUpload.setMaxUploadSizeKB(picUploadlimitKB, null, null); - fileUpload.addActionListener(this, FormEvent.ONCHANGE); + fileUpload.addActionListener(FormEvent.ONCHANGE); fileUpload.setVisible(!managed); Set<String> mimeTypes = new HashSet<String>(); diff --git a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/ui/PaypalMasterAccountController.java b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/ui/PaypalMasterAccountController.java index 72909ee7e70bc267c5a55e579f5a6f088d2aa123..fc5a055a5373c89c4ede6625caaf087325ab6840 100644 --- a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/ui/PaypalMasterAccountController.java +++ b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/ui/PaypalMasterAccountController.java @@ -134,7 +134,7 @@ public class PaypalMasterAccountController extends FormBasicController { } vatEnabledEl = uifactory.addCheckboxesHorizontal("vat.enabled", "vat.enabled", formLayout, vatKeys, vatValues, null); - vatEnabledEl.addActionListener(this, FormEvent.ONCHANGE); + vatEnabledEl.addActionListener(FormEvent.ONCHANGE); if(acModule.isVatEnabled()) { vatEnabledEl.select(vatKeys[0], true); } diff --git a/src/main/java/org/olat/resource/accesscontrol/ui/AccessControlAdminController.java b/src/main/java/org/olat/resource/accesscontrol/ui/AccessControlAdminController.java index a7e603840e1510541d8abd4c7cc2c7ea7cd45021..110d09a6889815649bf5b765aa77c6e5efcedefb 100644 --- a/src/main/java/org/olat/resource/accesscontrol/ui/AccessControlAdminController.java +++ b/src/main/java/org/olat/resource/accesscontrol/ui/AccessControlAdminController.java @@ -96,7 +96,7 @@ public class AccessControlAdminController extends FormBasicController { methods.select("token.method", acModule.isTokenEnabled()); methods.select("paypal.method", acModule.isPaypalEnabled()); methods.setEnabled(acModule.isEnabled()); - methods.addActionListener(this, FormEvent.ONCHANGE); + methods.addActionListener(FormEvent.ONCHANGE); uifactory.addSpacerElement("itgirl", formLayout, false); diff --git a/src/main/java/org/olat/user/PreferencesFormController.java b/src/main/java/org/olat/user/PreferencesFormController.java index 313b8beff5fc447a7c3f658dbcdc7f59ab4da7bb..8d13f46e13d6bf54ed91d120179f0b1e78c63557 100644 --- a/src/main/java/org/olat/user/PreferencesFormController.java +++ b/src/main/java/org/olat/user/PreferencesFormController.java @@ -211,7 +211,7 @@ public class PreferencesFormController extends FormBasicController { fontsize = uifactory.addDropdownSingleselect("form.fontsize", formLayout, cssFontsizeKeys, cssFontsizeValues, null); fontsize.setElementCssClass("o_sel_home_settings_fontsize"); fontsize.select(prefs.getFontsize(), true); - fontsize.addActionListener(this, FormEvent.ONCHANGE); + fontsize.addActionListener(FormEvent.ONCHANGE); // Email notification interval NotificationsManager nMgr = NotificationsManager.getInstance();