Search in sources :

Example 1 with EPMultipleMapController

use of org.olat.portfolio.ui.structel.EPMultipleMapController in project OpenOLAT by OpenOLAT.

the class EPMapRunController method init.

private VelocityContainer init(UserRequest ureq) {
    vC = createVelocityContainer("mymapsmain");
    vC.contextPut("overview", Boolean.TRUE);
    if (create) {
        createMapLink = LinkFactory.createButton("create.map", vC, this);
        createMapLink.setElementCssClass("o_sel_create_map");
    }
    String documentType;
    switch(option) {
        case MY_DEFAULTS_MAPS:
            documentType = "type.d*." + EPDefaultMap.class.getSimpleName();
            break;
        case MY_EXERCISES_MAPS:
            documentType = "type.*." + EPStructuredMap.class.getSimpleName();
            break;
        default:
            documentType = null;
            break;
    }
    if (documentType != null) {
        SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory) CoreSpringFactory.getBean(SearchServiceUIFactory.class);
        searchController = searchServiceUIFactory.createInputController(ureq, getWindowControl(), DisplayOption.STANDARD, null);
        listenTo(searchController);
        vC.put("search_input", searchController.getInitialComponent());
        searchController.setDocumentType(documentType);
        searchController.setResourceContextEnable(true);
        searchController.setResourceUrl(null);
    }
    initTitle(vC);
    removeAsListenerAndDispose(multiMapCtrl);
    multiMapCtrl = new EPMultipleMapController(ureq, getWindowControl(), option, choosenOwner);
    listenTo(multiMapCtrl);
    vC.put("mapCtrl", multiMapCtrl.getInitialComponent());
    return vC;
}
Also used : SearchServiceUIFactory(org.olat.search.SearchServiceUIFactory) EPMultipleMapController(org.olat.portfolio.ui.structel.EPMultipleMapController)

Example 2 with EPMultipleMapController

use of org.olat.portfolio.ui.structel.EPMultipleMapController in project openolat by klemens.

the class EPMapRunController method init.

private VelocityContainer init(UserRequest ureq) {
    vC = createVelocityContainer("mymapsmain");
    vC.contextPut("overview", Boolean.TRUE);
    if (create) {
        createMapLink = LinkFactory.createButton("create.map", vC, this);
        createMapLink.setElementCssClass("o_sel_create_map");
    }
    String documentType;
    switch(option) {
        case MY_DEFAULTS_MAPS:
            documentType = "type.d*." + EPDefaultMap.class.getSimpleName();
            break;
        case MY_EXERCISES_MAPS:
            documentType = "type.*." + EPStructuredMap.class.getSimpleName();
            break;
        default:
            documentType = null;
            break;
    }
    if (documentType != null) {
        SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory) CoreSpringFactory.getBean(SearchServiceUIFactory.class);
        searchController = searchServiceUIFactory.createInputController(ureq, getWindowControl(), DisplayOption.STANDARD, null);
        listenTo(searchController);
        vC.put("search_input", searchController.getInitialComponent());
        searchController.setDocumentType(documentType);
        searchController.setResourceContextEnable(true);
        searchController.setResourceUrl(null);
    }
    initTitle(vC);
    removeAsListenerAndDispose(multiMapCtrl);
    multiMapCtrl = new EPMultipleMapController(ureq, getWindowControl(), option, choosenOwner);
    listenTo(multiMapCtrl);
    vC.put("mapCtrl", multiMapCtrl.getInitialComponent());
    return vC;
}
Also used : SearchServiceUIFactory(org.olat.search.SearchServiceUIFactory) EPMultipleMapController(org.olat.portfolio.ui.structel.EPMultipleMapController)

Aggregations

EPMultipleMapController (org.olat.portfolio.ui.structel.EPMultipleMapController)2 SearchServiceUIFactory (org.olat.search.SearchServiceUIFactory)2