on 2020 Jun 12 12:28 AM
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
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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
33 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.