Search in sources :

Example 1 with SearchValue

use of com.evolveum.midpoint.web.component.search.SearchValue in project midpoint by Evolveum.

the class PageUsers method initSearch.

private void initSearch(String text) {
    PageStorage storage = getSessionStorage().getPageStorageMap().get(SessionStorage.KEY_USERS);
    if (storage == null) {
        storage = getSessionStorage().initPageStorage(SessionStorage.KEY_USERS);
    }
    Search search = SearchFactory.createSearch(UserType.class, this);
    if (SearchBoxModeType.FULLTEXT.equals(search.getSearchType())) {
        search.setFullText(text);
    } else if (search.getItems() != null && search.getItems().size() > 0) {
        SearchItem searchItem = search.getItems().get(0);
        searchItem.getValues().add(new SearchValue<>(text));
    }
    storage.setSearch(search);
    getSessionStorage().getPageStorageMap().put(SessionStorage.KEY_USERS, storage);
}
Also used : Search(com.evolveum.midpoint.web.component.search.Search) SearchValue(com.evolveum.midpoint.web.component.search.SearchValue) PageStorage(com.evolveum.midpoint.web.session.PageStorage) SearchItem(com.evolveum.midpoint.web.component.search.SearchItem)

Aggregations

Search (com.evolveum.midpoint.web.component.search.Search)1 SearchItem (com.evolveum.midpoint.web.component.search.SearchItem)1 SearchValue (com.evolveum.midpoint.web.component.search.SearchValue)1 PageStorage (com.evolveum.midpoint.web.session.PageStorage)1