Attribute Radio Button list in mendix 8.18.15

0
Hi All, We have recently upgraded Mx version from 7x to 8.18.15. And facing error with Attribute Radio button widget. it is failing for Enum data types only. throwing error : Enum_testing.attributeRadiobuttonList1: Error while applying context TypeError: this._contextObj.getEnumKVPairs is not a function. If anyone came across this error and has a solution or any alternative to this widget, you inputs would be of great help.    
asked
3 answers
5

Hi Rahul,

 

You can try this widget https://marketplace.mendix.com/link/component/111237

 

Thanks!

answered
2

using getEnumMap, it will return an object array instead of object.

 

and need to change this function as below 

 

checkEnumValue: function (value) {
      if (this._contextObj && !this._contextObj.isBoolean(this.name)) {
        var kv = this._contextObj.getEnumMap(this.name);
        var valueExist = kv.some((kv) => kv.key === value);
        if (!valueExist) {
          this._addValidation(
            " The value: " + value + " is not valid for this enumeration"
          );
        }
      }
    },

 

image.png

answered
0

You are not the first to run into this error: https://forum.mendix.com/link/questions/108918.

answered