I want to set the foundset property of a custom component at runtime like described in the documentation.
However I get an error when I want set this property.
- Code: Select all
var _grid = forms.Demo_ArticleGrid_InMemory.elements.Data_Grid_1
_grid.foundset = 'mem:article_inmem'
Gives this error in developer :
> java.lang.RuntimeException: Cannot set mem:article_inmem into a foundset property type; for existing foundset properties you can set the myProp.foundset or myProp.dataproviders directly. If you want to set a complete new value you have to give here something like { foundset : ...someFoundset..., dataproviders : { dp1: 'userNickname', dp2: 'userReviewRating', ... } } instead.
at com.servoy.j2db.server.ngclient.property.FoundsetPropertyType.toSabloComponentValue(FoundsetPropertyType.java:361)
I also tried with the suggested { foundset : ...someFoundset..., dataproviders : { dp1: 'userNickname', dp2: 'userReviewRating', ... } } , but that resulted in the same error.
Robrecht