I have a widget that needs to return the value of an enumeration. It worked fine in Mx 5.13.1, but when upgrading to Mx 5.14.0 it's causing errors. The Mxui.js does not have the getEnumValue function anymore. How can I change my code so I can get the value of an enum in Mx 5.14.0 and above? See my code below: if(attrtype == 'Enum') { if(enumrendermappings) { var enumKey = object.getEnumValue(this.columnattr); if (enumKey) { var m = null for(var i = 0; i < enumrendermappings.length; i++) { m = enumrendermappings[i] if(m.enumkey == enumKey) { title = object.getEnumCaption(m.enumcolumnattr); imgUrl = m.enumpicture; if (m.enumalt != '') title = m.enumalt; } } } } }
asked
Robert Zuijdam
1 answers
3
Try using the regular mxobject.get() function or otherwise extract the enumMap options with getEnumMap and then loop trough the array to find the correct key based on the getEnumCaption().