use of org.olat.core.gui.components.form.flexible.impl.FormEvent in project openolat by klemens.
the class AttributeEasyRowAdderController method event.
@Override
protected void event(final UserRequest ureq, final Controller source, final Event event) {
if (event instanceof FormEvent) {
final FormEvent fe = (FormEvent) event;
final FormItem sourceItem = fe.getFormItemSource();
final String compName = sourceItem.getName();
if (columnAddRow.contains(compName)) {
// add link clicked
final int clickPos = ((Integer) sourceItem.getUserObject()).intValue();
addRowAt(clickPos + 1);
} else if (columnRemoveRow.contains(compName)) {
// remove link clicked
final int clickPos = ((Integer) sourceItem.getUserObject()).intValue();
removeRowAt(clickPos);
}
}
}
use of org.olat.core.gui.components.form.flexible.impl.FormEvent in project openolat by klemens.
the class ResumeController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source.equals(noButton)) {
savePreferences(ureq, "none");
fireEvent(ureq, new Event("no"));
} else if (source.equals(landingButton)) {
savePreferences(ureq, "none");
fireEvent(ureq, new Event("landing"));
}
}
use of org.olat.core.gui.components.form.flexible.impl.FormEvent in project OpenOLAT by OpenOLAT.
the class CheckboxEditController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (deleteLink == source) {
fireEvent(ureq, new Event("delete"));
if (courseNode != null) {
ThreadLocalUserActivityLogger.log(CourseLoggingAction.CHECKLIST_CHECKBOX_DELETED, getClass(), LoggingResourceable.wrap(courseNode), LoggingResourceable.wrapNonOlatResource(StringResourceableType.checkbox, checkbox.getCheckboxId(), checkbox.getTitle()));
}
} else if (downloadFileLink == source) {
doDownloadFile(ureq);
} else if (deleteFileLink == source) {
deleteFile();
} else if (awardPointEl == source) {
pointsEl.setVisible(withScore && awardPointEl.isAtLeastSelected(1));
} else if (fileEl == source) {
String filename = fileEl.getUploadFileName();
downloadFileLink.setI18nKey(filename);
downloadFileLink.setEnabled(false);
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.FormEvent in project openolat by klemens.
the class EPViewModeController method formInnerEvent.
/**
* @see org.olat.core.gui.components.form.flexible.impl.FormBasicController#formInnerEvent(org.olat.core.gui.UserRequest, org.olat.core.gui.components.form.flexible.FormItem, org.olat.core.gui.components.form.flexible.impl.FormEvent)
*/
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == tableLink || source == detailsLink) {
FormLink link = (FormLink) source;
if (!link.getCmd().equals(userPrefsMode)) {
String newUserPrefsMode = link.getCmd();
ePFMgr.setUsersPreferedArtefactViewMode(getIdentity(), newUserPrefsMode, context);
userPrefsMode = newUserPrefsMode;
fireEvent(ureq, new Event(VIEWMODE_CHANGED_EVENT_CMD));
}
}
}
use of org.olat.core.gui.components.form.flexible.impl.FormEvent in project openolat by klemens.
the class FormToggleImpl method dispatchFormRequest.
@Override
public void dispatchFormRequest(UserRequest ureq) {
toggle();
getRootForm().fireFormEvent(ureq, new FormEvent(Event.DONE_EVENT, this, FormEvent.ONCLICK));
}
Aggregations