Pluggable widget and list of object from datasource

0
Hello everyone, I am trying to build a pluggable widget which receive data from a datasource configured in mendix, but for some reason I am not able to extract the Mendix obect from the prop List attribute which I get back , when I receive data from the datasource I can clearly see the list of items id’s and data, but I am not able to map them into a usable list of MxObjects. For example this is a sample of what I get back but I can’t seem to get the list of mxObjects out of this list when I use the map function doing something along these lines items.map( (i:MxObject ) => i ) can anyone point out what I am doing wrong?   Thanks  
asked
1 answers
1

Hi

You need to use this property type in conjunction with another property type (widgets since 8.7, action since 8.9)

Here is the detail from the docs (https://docs.mendix.com/apidocs-mxsdk/apidocs/client-apis-for-pluggable-widgets#listvalue):
"However it is not possible to access domain data directly from ListValue, as every object is represented only by GUID in the items array. Instead, a list of items may be used in combination with other properties, for example with a property of type widgets. The dataSource attribute on that property should reference a datasource property."

Widgets property:
https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#widgets
Actions property:
https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#action

Hope that helps

iain

 

 

answered