Search in sources :

Example 1 with SearchInputController

use of org.olat.search.ui.SearchInputController in project OpenOLAT by OpenOLAT.

the class SearchUserTool method getMenuComponent.

@Override
public Component getMenuComponent(UserRequest ureq, VelocityContainer container) {
    if (searchC == null) {
        String resourceUrl = null;
        BusinessControl bc = wControl.getBusinessControl();
        if (bc != null) {
            resourceUrl = bc.getAsString();
        }
        searchC = new SearchInputController(ureq, wControl, resourceUrl, DisplayOption.STANDARD);
        searchC.setResourceContextEnable(false);
        searchC.setAssessmentListener(ureq);
    }
    String componentName = "search-menu-" + CodeHelper.getRAMUniqueID();
    String velocity_root = Util.getPackageVelocityRoot(SearchControllerFactory.class);
    String pagePath = velocity_root + "/search_tool.html";
    VelocityContainer search = new VelocityContainer(componentName, pagePath, container.getTranslator(), this);
    search.setDomReplacementWrapperRequired(false);
    search.put("search_input", searchC.getInitialComponent());
    container.put(componentName, search);
    return search;
}
Also used : SearchInputController(org.olat.search.ui.SearchInputController) BusinessControl(org.olat.core.id.context.BusinessControl) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 2 with SearchInputController

use of org.olat.search.ui.SearchInputController in project openolat by klemens.

the class SearchUserTool method getMenuComponent.

@Override
public Component getMenuComponent(UserRequest ureq, VelocityContainer container) {
    if (searchC == null) {
        String resourceUrl = null;
        BusinessControl bc = wControl.getBusinessControl();
        if (bc != null) {
            resourceUrl = bc.getAsString();
        }
        searchC = new SearchInputController(ureq, wControl, resourceUrl, DisplayOption.STANDARD);
        searchC.setResourceContextEnable(false);
        searchC.setAssessmentListener(ureq);
    }
    String componentName = "search-menu-" + CodeHelper.getRAMUniqueID();
    String velocity_root = Util.getPackageVelocityRoot(SearchControllerFactory.class);
    String pagePath = velocity_root + "/search_tool.html";
    VelocityContainer search = new VelocityContainer(componentName, pagePath, container.getTranslator(), this);
    search.setDomReplacementWrapperRequired(false);
    search.put("search_input", searchC.getInitialComponent());
    container.put(componentName, search);
    return search;
}
Also used : SearchInputController(org.olat.search.ui.SearchInputController) BusinessControl(org.olat.core.id.context.BusinessControl) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Aggregations

VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)2 BusinessControl (org.olat.core.id.context.BusinessControl)2 SearchInputController (org.olat.search.ui.SearchInputController)2