Object parameter for pluggable widget

1
Is it possible to pass an entire object (of an entity) to a pluggable widget?   Due to the docs there is an Object property type (https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#object) but this seems to be more for lists. I would need it just for one object. For instance creating a non-persistable helper object that contains all necessary data the needs to be passed to the widget this would make live much easier than hard-wiring all attributes separately.
asked
2 answers
1

Hello Christoph,

Yes you can pass single object. 

- You can skip isList or set it to false

- You must also set allowNonPersistableEntities="true" to use NPE

<property key="Entity" type="entity" isPath="yes" pathType="reference" allowNonPersistableEntities="true">
      <caption>Entity</caption>
      <category>Data source</category>
      <description></description>
</property>

https://docs.mendix.com/howto/extensibility/use-xml-widget#4-2-attributes

BTW I am using 7.23.15. Based on Modeler version, few changes might be needed. So refer the documentation for proper attributes and values required

EDIT


Try something like <property key="myObject" type="object" isList="false" allowNonPersistableEntities="true">. As said, I was using older version and this is definition I used for custom widgets not for pluggable widget

answered
0

Hello Christoph,  were you solved this issue?

answered