Portal : Fixed a bug in linkedset when removing last object

SVN:trunk[4004]
This commit is contained in:
Guillaume Lajarige
2016-04-19 13:47:24 +00:00
parent 8834e1b49c
commit e262dbfcf2

View File

@@ -168,7 +168,13 @@ EOF
'get_current_value_callback': function(me, oEvent, oData){
var value = null;
value = JSON.parse(me.element.find('#{$this->oField->GetGlobalId()}').val());
// Retrieving JSON value as a string and not an object
//
// Note : The value is passed as a string instead of an array because the attribute would not be included in the posted data when empty.
// Which was an issue when deleting all objects from linkedset
//
// Old code : value = JSON.parse(me.element.find('#{$this->oField->GetGlobalId()}').val());
value = me.element.find('#{$this->oField->GetGlobalId()}').val();
return value;
},