cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop for MultiReferenceEditor

Former Member
0 Kudos

Hi Experts,

I'm currently implementing a drag and drop functionality for the compare view.

Everything works fine except for the Multireferenceeditor. When I'm dragging from product 1 and dropping it on product 2 the list of the referenceeditor gets inserted into the list of product 2 and removed from product 1. All simple fields like textboxes work fine except the referenceeditor.

Is it not possible for Multireferenceeditors to copy values from one product to another?

Cheers, Daniel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi , yeah it's working fine currently. I've set a drag and drop for the content, while drag and dropping I get the value from the attribute via ModelService and pass it to the Attribute of the target Object. I'm currently dragging the div around the Editor and drop it on the other column. So far it's working fine except for the Multireferenceeditor

The thing is it's working with Multireferenceeditors but it is erasing the value from the attribute of the source product when I'm refreshing the compareview. The dragged context is on the target product but it's gone on the source product though.

But I'll have a look on it.

former_member625836
Active Contributor
0 Kudos

Hi ,

I'm really happy to hear that you are implementing such extension for CompareView! To be honest I'm very curious of how you did it 🙂

When it comes to feasibility of such feature in case of Multireferenceeditor, I don't see any reason for not having it there. Nevertheless it highly depends on how you implemented this d'n'd feature.

I would suggest looking into com.hybris.cockpitng.editor.commonreferenceeditor.AbstractReferenceEditor, com.hybris.cockpitng.editor.commonreferenceeditor.ReferenceEditorLayout and com.hybris.cockpitng.editor.commonreferenceeditor.ReferenceEditorListItemRendererFactory.

Cheers, Jacek

Former Member
0 Kudos

Oh I completly forgot that it's the extended multireference editor and not the normal multireference editor. There the createSelectedItemsListItemRenderer gets overwritten with a rowrenderer