Search in sources :

Example 1 with MyItemsSource

use of org.olat.modules.qpool.ui.datasource.MyItemsSource in project OpenOLAT by OpenOLAT.

the class MyQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new MyItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), ITEM_SOURCE_NAME);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, TABLE_PREFERENCE_PREFIX, false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController) MyItemsSource(org.olat.modules.qpool.ui.datasource.MyItemsSource)

Example 2 with MyItemsSource

use of org.olat.modules.qpool.ui.datasource.MyItemsSource in project openolat by klemens.

the class MyQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new MyItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), ITEM_SOURCE_NAME);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, TABLE_PREFERENCE_PREFIX, false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController) MyItemsSource(org.olat.modules.qpool.ui.datasource.MyItemsSource)

Example 3 with MyItemsSource

use of org.olat.modules.qpool.ui.datasource.MyItemsSource in project openolat by klemens.

the class SelectItemController method updateOwnedGroups.

private void updateOwnedGroups(UserRequest ureq) {
    if (ownedItemsCtrl == null) {
        DefaultItemsSource source = new MyItemsSource(getIdentity(), ureq.getUserSession().getRoles(), "My");
        source.getDefaultParams().setAuthor(getIdentity());
        source.getDefaultParams().setFormat(restrictToFormat);
        ownedItemsCtrl = new ItemListController(ureq, getWindowControl(), secCallback, source);
        listenTo(ownedItemsCtrl);
    }
    ownedItemsCtrl.updateList();
    mainVC.put("itemList", ownedItemsCtrl.getInitialComponent());
}
Also used : DefaultItemsSource(org.olat.modules.qpool.ui.datasource.DefaultItemsSource) MyItemsSource(org.olat.modules.qpool.ui.datasource.MyItemsSource)

Example 4 with MyItemsSource

use of org.olat.modules.qpool.ui.datasource.MyItemsSource in project OpenOLAT by OpenOLAT.

the class SelectItemController method updateOwnedGroups.

private void updateOwnedGroups(UserRequest ureq) {
    if (ownedItemsCtrl == null) {
        DefaultItemsSource source = new MyItemsSource(getIdentity(), ureq.getUserSession().getRoles(), "My");
        source.getDefaultParams().setAuthor(getIdentity());
        source.getDefaultParams().setFormat(restrictToFormat);
        ownedItemsCtrl = new ItemListController(ureq, getWindowControl(), secCallback, source);
        listenTo(ownedItemsCtrl);
    }
    ownedItemsCtrl.updateList();
    mainVC.put("itemList", ownedItemsCtrl.getInitialComponent());
}
Also used : DefaultItemsSource(org.olat.modules.qpool.ui.datasource.DefaultItemsSource) MyItemsSource(org.olat.modules.qpool.ui.datasource.MyItemsSource)

Aggregations

MyItemsSource (org.olat.modules.qpool.ui.datasource.MyItemsSource)4 WindowControl (org.olat.core.gui.control.WindowControl)2 QuestionItemsSource (org.olat.modules.qpool.ui.QuestionItemsSource)2 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)2 DefaultItemsSource (org.olat.modules.qpool.ui.datasource.DefaultItemsSource)2