Search in sources :

Example 1 with MarkedItemsSource

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

the class SelectItemController method updateMarkedItems.

private int updateMarkedItems(UserRequest ureq) {
    if (markedItemsCtrl == null) {
        DefaultItemsSource source = new MarkedItemsSource(getIdentity(), ureq.getUserSession().getRoles(), "Fav");
        source.getDefaultParams().setFavoritOnly(true);
        source.getDefaultParams().setFormat(restrictToFormat);
        markedItemsCtrl = new ItemListController(ureq, getWindowControl(), secCallback, source);
        listenTo(markedItemsCtrl);
    }
    int numOfMarkedItems = markedItemsCtrl.updateList();
    mainVC.put("itemList", markedItemsCtrl.getInitialComponent());
    return numOfMarkedItems;
}
Also used : DefaultItemsSource(org.olat.modules.qpool.ui.datasource.DefaultItemsSource) MarkedItemsSource(org.olat.modules.qpool.ui.datasource.MarkedItemsSource)

Example 2 with MarkedItemsSource

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

the class MarkedQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new MarkedItemsSource(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 : MarkedItemsSource(org.olat.modules.qpool.ui.datasource.MarkedItemsSource) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 3 with MarkedItemsSource

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

the class MarkedQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new MarkedItemsSource(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 : MarkedItemsSource(org.olat.modules.qpool.ui.datasource.MarkedItemsSource) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 4 with MarkedItemsSource

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

the class SelectItemController method updateMarkedItems.

private int updateMarkedItems(UserRequest ureq) {
    if (markedItemsCtrl == null) {
        DefaultItemsSource source = new MarkedItemsSource(getIdentity(), ureq.getUserSession().getRoles(), "Fav");
        source.getDefaultParams().setFavoritOnly(true);
        source.getDefaultParams().setFormat(restrictToFormat);
        markedItemsCtrl = new ItemListController(ureq, getWindowControl(), secCallback, source);
        listenTo(markedItemsCtrl);
    }
    int numOfMarkedItems = markedItemsCtrl.updateList();
    mainVC.put("itemList", markedItemsCtrl.getInitialComponent());
    return numOfMarkedItems;
}
Also used : DefaultItemsSource(org.olat.modules.qpool.ui.datasource.DefaultItemsSource) MarkedItemsSource(org.olat.modules.qpool.ui.datasource.MarkedItemsSource)

Aggregations

MarkedItemsSource (org.olat.modules.qpool.ui.datasource.MarkedItemsSource)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