Configure entity and its attributes in Pluggable widget

0
Hi everyone, - In traditional “custom widget, I used to be able to configure an entity and its entity by:   https://docs.mendix.com/howto/extensibility/use-xml-widget#5-2-1-entity https://docs.mendix.com/howto/extensibility/use-xml-widget#5-1-attribute So from a Company (as Context Object of widget), i can retrieve Employee then print a list of Employee’s Name.   - Now with new “pluggable widget” in Mx 8.7, it seems we are able to use  Datasource, so basically we can do the retrieval https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#datasource however, in XML configuration file, I don’t know how to config an entity specifying Employee and its attributes. There is error if i attempt to: Error in property 'employeeEntity': Entity/EntityConstraint properties are not supported by pluggable widgets (pluginWidget="true")   Do you know any solutions for my issue? (and if it is not possible, in which case we could use the new Datasource?) DUC P/s: there is a similar post but no solution suggested  https://community.mendix.com/link/questions/96406 https://community.mendix.com/link/questions/98551
asked
1 answers
1

In the Mendix developers slack there is a discussion thread #widget-development, you might be interested in. Here a selection:

Robert van 't Hof  12:48 PM
Anyone know if/how I can use 1-deep attributes in a pluggable widget?
Austin McNicholas  12:53 PM
i ran into this issue too. You cant define the association name like in a custom widget. You can try using a string to have the user write the association name and then use the client api to retrieve it.
Robert van 't Hof  12:57 PM
That a shame, thats the last step I need to turn my widget into a pluggable widget. (edited) 
1:00
@Danny Roest is it on the roadmap to add these normal widget features for pluggable widgets as well?
Danny Roest  1:00 PM
was added to #widget-development by
.
Robert van 't Hof  1:01 PM
I also try to retrieve a list of objects with a microflow and then need an attribute on that entity to be declared for that entity
1:01
I cant let the user specify an Entity, nor link an Attribute to that entityproperty :disappointed:
Austin McNicholas  1:02 PM
I'm also curious about that, or if there is a different way to do this. To my knowledge there isnt. I recently needed to develop a widget and ran into blocker after blocker. Another issue I ran into was i couldnt define a microflow without an action. So i couldnt define a return type for the microflow and use that data in my widget (edited) 
Robert van 't Hof  1:03 PM
Yeah that was gonna be my next hurdle, getting a list of objects from an 'action'
Austin McNicholas  1:05 PM
yeah from my research I couldnt do it and i ended up making a custom widget. I tried going through existing widgets that were added to the appstore to see how they did this, and couldnt find any pluggable widgets that did this.
Danny Roest  3:19 PM
Hi all. Just to add some clarification, there is a strong focus on pluggable widgets and making them more powerful, however, these things take time, as it requires some fundamental changes. There are already so many new things possible like text templates, containment, repeatable containment, and don't forget creating widgets saves sooo much code now, React based, you can use dependencies, Typescript etc.We are currently working on retrieving a list of objects. In 8.8 you can already play with this. Its not fully finished yet (we are working on some refresh details), but if you want, I can share how to use it. (edited) 
3:20
With 8.8 we will also release the first pluggable widget that has conditional visibility of settings, something we are also finalizing.
3:21
If you have questions on how to do this, please ask, sometimes we envision another pattern and requires a different way of thinking. We dont want to rebuild the dojo approach

 

answered