How to get data from enitity

0
Today, I am working on building Pluggable widget.  I have created it like this to get the attribute of entity. After that, I custom file PageNative.jsx:  When I use PageNative in web, it display:  I received the value of each attribute on entity. But actually, I want to get all of list items in entity to render. For instance, id:1 , name: “Duong”, age: “22”. Is there any way to do that? Best regards, Duong
asked
1 answers
0

Hi Duong,

 

You need to link your attributes to a list of entities by passing in a datasource property

<property key="data" type="datasource" isList="true" required="false">
	<caption>Data source</caption>
	<description />
</property>

and linking it to the attribute:

https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#attribute

 

You can then retrieve the data from the list using the patterns outlined in the docs:

https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listattributevalue

 

 

answered