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

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?
1 answers

Hi Maike,


I don’t think this is possible yet. It has been a wanted feature for some time, see

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