Itvisors / mendix-DataTables

DataTables.net wrapper for Mendix
Apache License 2.0
4 stars 3 forks source link

Your comment says this can't be done. It can, the syntax is undocumented. #5

Open tieniber opened 6 years ago

tieniber commented 6 years ago

I'm referring to here:

https://github.com/Itvisors/mendix-DataTables/blob/cc61d119d649f71ded2b3271d3cbfbc8c8ab6075/src/DataTables/DataTables.xml#L46

You just have to specify the entity property like this: entityProperty="../tableEntity" So you're indicating that you need to traverse up one level to get to that entity property. Hope that helps!

mgroeneweg commented 6 years ago

Good to know the feature is actually there. However, Mendix is quite busy pruning any undocumented stuff while updating the documentation on the official features. So I will not use this feature until it is clear that it is here to stay.

Thanks for the heads-up anyway,

tieniber commented 6 years ago

Turns out this actually is documented:

Per: https://github.com/mendix/docs/blob/development/content/refguide/xml-reference-guide.md

entityProperty: Assigns a entity to a property. This should point to the key attribute of the entity to which it is related. This could also be relative (like "../entityName") when the attribute is inside a object list:

mgroeneweg commented 6 years ago

LOL! That's new. Well it does sound like a great idea however it would also break existing usage of the widget so I probably need to add the new properties while deprecating the old stuff to allow migration. I will reopen this issue, probably a nice one when adding new functionality.