use of com.evolveum.midpoint.web.component.search.SpecialSearchItem in project midpoint by Evolveum.
the class RoleCatalogTabPanel method createScopeItem.
private SearchItem createScopeItem(Search search) {
return new SpecialSearchItem(search) {
@Override
public ObjectFilter createFilter(PageBase pageBase, VariablesMap variables) {
return null;
}
@Override
public SearchSpecialItemPanel createSpecialSearchPanel(String id) {
return new SearchSpecialItemPanel(id, new PropertyModel(getRoleCatalogStorage(), RoleCatalogStorage.F_ORG_SEARCH_SCOPE)) {
@Override
protected WebMarkupContainer initSearchItemField(String id) {
DropDownChoicePanel inputPanel = new DropDownChoicePanel(id, getModelValue(), Model.of(Arrays.asList(SearchBoxScopeType.values())), new EnumChoiceRenderer(), false);
inputPanel.getBaseFormComponent().add(WebComponentUtil.getSubmitOnEnterKeyDownBehavior("searchSimple"));
inputPanel.getBaseFormComponent().add(AttributeAppender.append("style", "width: 88px; max-width: 400px !important;"));
inputPanel.setOutputMarkupId(true);
return inputPanel;
}
@Override
protected IModel<String> createLabelModel() {
return getPageBase().createStringResource("abstractRoleMemberPanel.searchScope");
}
@Override
protected IModel<String> createHelpModel() {
return getPageBase().createStringResource("abstractRoleMemberPanel.searchScope.tooltip");
}
};
}
};
}
Aggregations