Search in sources :

Example 1 with SearchBoxConfigurationHelper

use of com.evolveum.midpoint.web.page.admin.roles.SearchBoxConfigurationHelper in project midpoint by Evolveum.

the class AbstractRoleMemberPanel method createMemberSearch.

private <AH extends AssignmentHolderType> Search<AH> createMemberSearch(Class<AH> type) {
    MemberPanelStorage memberPanelStorage = getMemberPanelStorage();
    if (memberPanelStorage == null) {
        // normally, this should not happen
        return SearchFactory.createSearch(new ContainerTypeSearchItem<>(type), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
    }
    if (memberPanelStorage.getSearch() != null) {
        return memberPanelStorage.getSearch();
    }
    SearchBoxConfigurationHelper searchBoxConfig = getSearchBoxConfiguration();
    Search<AH> search = SearchFactory.createSearch(createSearchTypeItem(searchBoxConfig), null, null, null, getPageBase(), null, true, true, Search.PanelType.MEMBER_PANEL);
    search.addCompositedSpecialItem(createMemberSearchPanel(search, searchBoxConfig));
    if (additionalPanelConfig != null) {
        search.setCanConfigure(!Boolean.FALSE.equals(additionalPanelConfig.isAllowToConfigureSearchItems()));
    }
    memberPanelStorage.setSearch(search);
    return search;
}
Also used : SearchBoxConfigurationHelper(com.evolveum.midpoint.web.page.admin.roles.SearchBoxConfigurationHelper) MemberPanelStorage(com.evolveum.midpoint.web.session.MemberPanelStorage)

Example 2 with SearchBoxConfigurationHelper

use of com.evolveum.midpoint.web.page.admin.roles.SearchBoxConfigurationHelper in project midpoint by Evolveum.

the class AbstractRoleMemberPanel method getSearchBoxConfiguration.

protected SearchBoxConfigurationHelper getSearchBoxConfiguration() {
    if (searchBoxConfiguration != null) {
        return searchBoxConfiguration;
    }
    searchBoxConfiguration = new SearchBoxConfigurationHelper(additionalPanelConfig);
    searchBoxConfiguration.setDefaultSupportedRelations(getSupportedRelations());
    searchBoxConfiguration.setDefaultSupportedObjectTypes(getDefaultSupportedObjectTypes(false));
    searchBoxConfiguration.setDefaultObjectType(WebComponentUtil.classToQName(getPrismContext(), getDefaultObjectType()));
    // storage.setProjectSearchItem(searchBoxCofig.getDefaultProjectConfiguration());
    return searchBoxConfiguration;
}
Also used : SearchBoxConfigurationHelper(com.evolveum.midpoint.web.page.admin.roles.SearchBoxConfigurationHelper)

Aggregations

SearchBoxConfigurationHelper (com.evolveum.midpoint.web.page.admin.roles.SearchBoxConfigurationHelper)2 MemberPanelStorage (com.evolveum.midpoint.web.session.MemberPanelStorage)1