How to set the value of an association in pluggable widget (JSX)

0
We are trying to build a pluggable widget where we make use of an association. We managed to make the options of the reference attribute selectable, but now we don't know how to set the value of the reference. We use an association property with SelectableObjects and an attribute with SelectableObjects, which both use a datasource property. See here the XML: <propertyGroup caption = "General"> <property key="myAttributeOnDatasource" type="association" selectableObjects="myDataSource"> <caption>Reference</caption> <description>Reference</description> <associationTypes> <associationType name="Reference"/> <associationType name="ReferenceSet"/> </associationTypes> </property> <property key="propertyName" type="attribute" dataSource="myDataSource"> <caption>Station name</caption> <description>Station Name</description> <attributeTypes> <attributeType name="String"/> </attributeTypes> </property> </propertyGroup> <propertyGroup caption="Selectable Objects"> <property key="myDataSource" type="datasource" isList="true"> <caption>Selectable objects</caption> <description/> </property> </propertyGroup>   How do we set the value of the reference in our .jsx file? Does anyone have an example?
asked
1 answers
0

Hi Maike,

 

I don’t think this is possible yet. It has been a wanted feature for some time, see https://forum.mendix.com/link/questions/105072

How I sorted this out is by loading the Client API and using the addReference / removeReference functions.

answered