cancel
Showing results for 
Search instead for 
Did you mean: 

CustomerSupportBackoffice - Orders Sorting - asmdeeplinklisteditor

0 Kudos
217

Hi Friends,

In customersupportbackoffice, carts and orders collections are displayed in summary tab of Customer type. Editor used to render these orders is com.hybris.cockpitng.editor.asmdeeplinklisteditor. I am looking for a way to render this collection of orders in descending order. But not finding any configuration to achieve this.

Following snippet is rendering the expected results in search component, but not helpful in my scenario:

<context merge-by="type" type="Order" component="cs-simple-search" module="customersupportbackoffice">
<simple-search:simple-search>
<simple-search:sort-field name="creationtime" asc="false"/>
</simple-search:simple-search>
</context>

I tried context paramter "availableValuesProvider" as well to pass asc flag false in custom search facade. But this also not yielding the desired result.

Any advice on how to control orders sorting in asmdeeplinklisteditor.

Regards,

Arun

View Entire Topic
0 Kudos

I am able to achieve this by overriding as follows:

Overridden class: AssistedServiceListEditorRenderer

Overridden method: protected void changeSelectedObject(final Collection<T> list)

Code snippet:

if (list != null)
{
selectedItems.addAll(list);
Collections.reverse((java.util.List) selectedItems);
for (final T obj : selectedItems)
{
getEditorLayout().onAddSelectedObject(obj, false);
}
}

Added line: Collections.reverse((java.util.List) selectedItems);