pass entity object into Pluggable Widget

Hi, I’m working on a pluggable widget. This widget is placed within a DataView. I’d like to pass the entity object instance of the DataView into my pluggable widget. As far as I can see in the documentation, there is no way to define a propery of this type.    How can I pass this object into the widget?   - Tobias
2 answers

Hi Tobian,

You will have this available, but not in a direct way, as the dojo widget do.

The data can be access via the attribute prop, and will be automatically be updated

When calling an action the context will be handle automatically as configured by in the modeler. (none, parent, any parent)

So, for what kind of action do you need the context?





I found a workaround which seems to work.

It’s not really nice but it does its job.


What I did is add another property to the widget of type ‘datasource’.

I hooked up a nanoflow which wraps the scoped variable into a list and passes it into the widget.

Inside the widget I retrieve the list of the datasource and get the first object in it.