use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.
the class BinderRuntimeController method doMembers.
@Override
protected Activateable2 doMembers(UserRequest ureq) {
Activateable2 controller = super.doMembers(ureq);
enableRuntimeNavBar(false);
return controller;
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.
the class MembersManagementMainController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty())
return;
ContextEntry currentEntry = entries.get(0);
String cmd = currentEntry.getOLATResourceable().getResourceableTypeName();
Controller selectedCtrl = selectMenuItem(ureq, cmd);
if (selectedCtrl instanceof Activateable2) {
List<ContextEntry> subEntries = entries.subList(1, entries.size());
((Activateable2) selectedCtrl).activate(ureq, subEntries, currentEntry.getTransientState());
}
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.
the class AssessmentToolController method doSelectUsersView.
private Controller doSelectUsersView(UserRequest ureq, String resName, AssessedIdentityListState state) {
if (currentCtl != null) {
stackPanel.popController(currentCtl);
}
OLATResourceable ores = OresHelper.createOLATResourceableInstance(resName, 0l);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
addToHistory(ureq, bwControl);
Controller treeCtrl = element.createIdentityList(ureq, bwControl, stackPanel, testEntry, assessmentCallback);
listenTo(treeCtrl);
stackPanel.pushController(translate("users"), treeCtrl);
currentCtl = treeCtrl;
if (treeCtrl instanceof Activateable2) {
((Activateable2) treeCtrl).activate(ureq, null, state);
}
return currentCtl;
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.
the class MediaCenterController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
MediaRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
if (select) {
doSelect(ureq, row.getKey());
} else {
Activateable2 activateable = doOpenMedia(ureq, row.getKey());
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (event instanceof FlexiTableSearchEvent) {
loadModel();
}
} else if (newMediaCallout == source) {
doOpenNewMediaCallout(ureq, newMediaCallout);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("select".equals(cmd)) {
MediaRow row = (MediaRow) link.getUserObject();
if (select) {
doSelect(ureq, row.getKey());
} else {
Activateable2 activateable = doOpenMedia(ureq, row.getKey());
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
} else if ("tag".equals(cmd)) {
doToggleCategory(link);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.
the class MySharedItemsController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
MySharedItemRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
Activateable2 activateable = doSelectBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
loadModel(se.getSearch());
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations