Skip to content

Commit

Permalink
Make sure search configuration is propagated
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
  • Loading branch information
tonydamage committed Jul 7, 2022
1 parent e34f215 commit bc5c8ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.ContainerPanelConfigurationType;

import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.SearchBoxConfigurationType;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
Expand Down Expand Up @@ -78,7 +79,13 @@ protected Search createSearch(Class<C> type) {
}

private SearchConfigurationWrapper<C> createSearchConfigWrapper(Class<C> type) {
SearchConfigurationWrapper<C> searchConfigWrapper = new SearchConfigurationWrapper<C>(type);
SearchBoxConfigurationType maybeConfig = null;
if (getPanelConfiguration() != null && getPanelConfiguration().getListView() != null) {
maybeConfig = getPanelConfiguration().getListView().getSearchBoxConfiguration();
}


SearchConfigurationWrapper<C> searchConfigWrapper = maybeConfig != null ? new SearchConfigurationWrapper<C>(type, maybeConfig) : new SearchConfigurationWrapper<C>(type);
CompiledObjectCollectionView collectionView = getObjectCollectionView();
if (objectCollectionRefExists(collectionView)) {
searchConfigWrapper.setCollectionRefOid(collectionView.getCollection().getCollectionRef().getOid());
Expand Down Expand Up @@ -187,6 +194,7 @@ public List<InlineMenuItem> getDefaultMenuActions() {
menuItems.add(new ButtonInlineMenuItem(createStringResource("pageAdminFocus.button.delete")) {
private static final long serialVersionUID = 1L;

@Override
public CompositedIconBuilder getIconCompositedBuilder(){
return getDefaultCompositedIconBuilder(GuiStyleConstants.CLASS_DELETE_MENU_ITEM);
}
Expand Down Expand Up @@ -274,6 +282,7 @@ public void deleteItemPerformed(AjaxRequestTarget target, List<PrismContainerVal

protected abstract boolean isCreateNewObjectVisible();

@Override
public boolean isListPanelVisible(){
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,6 @@ protected List<? super AbstractSearchItemWrapper> initSearchableItemWrappers(Pri
return createSearchableItemWrappers(containerDef);
}

@Override
protected Search createSearch(Class<AssignmentType> type) {
Search search = super.createSearch(type);
search.setFullTextSearchEnabled(isRepositorySearchEnabled());
return search;
}

@Deprecated
protected List<SearchItemDefinition> createSearchableItems(PrismContainerDefinition<AssignmentType> containerDef) {
List<SearchItemDefinition> defs = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.prism.query.FullTextFilter;
import com.evolveum.midpoint.prism.query.ObjectFilter;
import com.evolveum.midpoint.prism.query.ObjectOrdering;
import com.evolveum.midpoint.prism.query.ObjectQuery;
Expand Down

0 comments on commit bc5c8ca

Please sign in to comment.