use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.
the class BinderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (newBinderDropdown == source) {
doNewBinderCallout(ureq);
} else if (newBinderFromCourseButton == source) {
doNewBinderFromCourse(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
BinderRow row = model.getObject(se.getIndex());
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open".equals(cmd)) {
BinderRow row = (BinderRow) link.getUserObject();
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.
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 klemens.
the class UserInfoMainController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty())
return;
String type = entries.get(0).getOLATResourceable().getResourceableTypeName();
if (StringHelper.containsNonWhitespace(type)) {
Controller controller = createComponent(ureq, type);
if (controller != null) {
if (controller instanceof Activateable2) {
List<ContextEntry> subEntries = entries.subList(1, entries.size());
((Activateable2) controller).activate(ureq, subEntries, entries.get(0).getTransientState());
}
main.setContent(controller.getInitialComponent());
TreeNode selectedNode = TreeHelper.findNodeByUserObject(type, menuTree.getTreeModel().getRootNode());
if (selectedNode != null) {
menuTree.setSelectedNode(selectedNode);
}
}
}
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.
the class AssessmentCourseTreeController method switchToBusinessGroupsView.
protected void switchToBusinessGroupsView(UserRequest ureq) {
view = View.groups;
TreeNode treeNode = menuTree.getSelectedNode();
CourseNode courseNode = (CourseNode) treeNode.getUserObject();
Controller ctrl = doSelectCourseNode(ureq, treeNode, courseNode);
if (ctrl instanceof Activateable2) {
((Activateable2) ctrl).activate(ureq, null, null);
}
}
use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.
the class AssessmentCourseTreeController method switchToUsersView.
/**
* Switch to the user list
*
* @param ureq
* @param stateOfUserList Optional
*/
protected void switchToUsersView(UserRequest ureq, StateEntry stateOfUserList) {
view = View.users;
TreeNode treeNode = menuTree.getSelectedNode();
CourseNode courseNode = (CourseNode) treeNode.getUserObject();
Controller ctrl = doSelectCourseNode(ureq, treeNode, courseNode);
if (ctrl instanceof Activateable2) {
((Activateable2) ctrl).activate(ureq, null, stateOfUserList);
}
}
Aggregations