Skip to Content
author's profile photo Former Member
Former Member

Backoffice: Applying Filter in sidebar resets addSearchDataConditions

When following the implementation guide "Initializing Advanced Search Widget with Multi Condition Queries" from and overriding public void addSearchDataConditions(AdvancedSearchData searchData) in the Order Fulfillment View of Backoffice the search conditions work as expected.

But these search conditions are reset as soon as a filter gets in the sidebar applied. (see screenshot)

Are there any possibilities to persist or reapply these search conditions?

     public void addSearchDataConditions(AdvancedSearchData searchData)
         if (searchData != null)
             if (CollectionUtils.isNotEmpty(searchData.getConditions("shippingLabel")))
             if (CollectionUtils.isNotEmpty(searchData.getConditions("returnLabel")))
             FieldType shippingLabelFieldType = new FieldType();
             FieldType returnLabelFieldType = new FieldType();
             List<SearchConditionData> labelConditionsList = new ArrayList<>();
             labelConditionsList.add(new SearchConditionData(shippingLabelFieldType, null, ValueComparisonOperator.IS_NOT_EMPTY));
             labelConditionsList.add(new SearchConditionData(returnLabelFieldType, null, ValueComparisonOperator.IS_NOT_EMPTY));
             SearchConditionDataList labelSearchConditionsList = SearchConditionDataList.and(labelConditionsList);
             searchData.addConditionList(ValueComparisonOperator.AND, Arrays.asList(labelSearchConditionsList));

filter backoffice

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.