At the moment it is not possible to use a non persistent object in a widget.
My use Case is that I Get via a Rest Call a big set of non persistent entities, which I have to persist in order to use them in a widget. The persisting takes a lot of time and could be omitted when a widget allows an NP object as the context object
I simply want to use a non-persistent object as my context object.
The widget is indeed a custom widget, but at the moment Mendix does not allow NP objects as the context object.
A work around would be to retrieve this non-persistent object in the Mendix client, but so far I have not figured out how to do that.
Which widget is it? If it is a custom widget, you will need to find the GitHub repository for that specific widget and create an issue there.