cancel
Showing results for 
Search instead for 
Did you mean: 

Backoffice: Multireference editor UI update response not working in 6.7

mbjorkman
Explorer
0 Kudos

Previously reported a problem with objectsUpdated not present in Hybris 6.3 (Expert Q Here) , now objectUpdated is removed completely and only objectsUpdated is left. This seems to be working in most cases but when using a MultiReference editor and editing the contained items in the popup dialog ("Edit details") then the objects in the model for the base object is not updated.

This is caused by the Objects.equals(currenctObject, updatedObject) but since updatedObject is passed as a collection now, this will ALWAYS be false.

 public class PyReferenceModelProperties extends DefaultReferenceModelProperties {
 
     @Override
     public void updateReferenceProperties(Set<String> referenceProperties, Object updatedObject, ObjectNotFoundExceptionHandler exceptionHandler) {
         if (updatedObject instanceof Collection) {
             final Collection<Object> updatedObjects = (Collection<Object>) updatedObject;
             updatedObjects.forEach(object -> super.updateReferenceProperties(referenceProperties, object, exceptionHandler));
         } else {
             super.updateReferenceProperties(referenceProperties, updatedObject, exceptionHandler);
         }
     }
 }

We solved this by replacing the bean for referenceModelProperties with the above class. Please also fix for next hybris release.

mbjorkman
Explorer
0 Kudos

Apparently the linking system was too hard for me to use

https://answers.sap.com/questions/12763375/backoffice-multireference-editor-removal-refresh-o.html

This was our previous post

Accepted Solutions (1)

Accepted Solutions (1)

former_member632755
Active Contributor
0 Kudos

Hi,

I will report that as a critical issue for the next release. Thank you for the detailed explanation and the fix 🙂

Cheers, Wojtek

Answers (1)

Answers (1)

former_member625836
Active Contributor
0 Kudos

Hi,

It was already fixed and will be released with 1808.

Cheers, Jacek