Pluggable Widgets: setValue() on binary attributes not supported...

0
Hi folks, I am trying use a pluggable widget to capture an image and save it into a System.Image instance. While I am successfully capturing the SVG on the page, converting it into a BLOB, pluggable widget finally says: NO. mxui says it more elegantly: “Attribute type Binary is not supported.”  Is this *another* pluggable widget limitation? And is there hope it gets addressed? Thanks! Boris  
asked
5 answers
2

Hi Boris,

File support is planned for this year and we have a dedicated team on the Pluggable Widget API's. For now Andries’ method could be an approach.

There are multiple API's we want/need to add (and the underlying architecture required for it) and to to it properly takes time. Please also note that pluggable widgets already offer quite some improvements over Dojo widgets.

answered
1

Hi Boris,

Check the feature list of pluggabale widgets, you can not upload data :( The API is still in development, so maybe in the future. 

https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets#2-differences-between-pluggable-and-custom-widgets

If you don’t want to use the DOJO widget, there is a workaround for PIW, it to convert the data in to string representative (base64) and use a java action server site to store the data in the FileDocument

Cheers, Andries

answered
1

I filed a ticket (#230378) for this. Mendix's response:

 

"After checking with the team, there are plans for the API to support this, but most likely not before H2 2025.We are working on a file uploader right now, for which we also need to work around this.  So, for now it is not ready, but it will be implemented in the future."

answered
0

Try using saveDocument instead of setAttribute https://apidocs.rnd.mendix.com/8/client/mx.data.html#.saveDocument

 

answered
0

Hi Andrej – I am in a react/typescrippt pluggable widget environment. I don’t have mx.data at hand nor the GUID of the mendix object. I am working like in the pluggable widget “textbox” example and can set (or not!) an attribute of the context object.

Is there a way around it - apart from switching to custom widgets? 

answered