Hello all,
We have a custom component, in which we render and implement order lines.
Now, we’ve got an extension we’re working on which requires us to nest a different foundset on orderline.
Is it possible to work with 1-on-many related data in an angularJS custom component, and if it is, how can I pass the related foundset/records?
Has anyone got experience with that?
In my template, I would basically need to do an ng-repeat within our current ng-repeat on orderlines to make the data useable within the component.
The two data types are tightly coupled.
I have instead found a way to work around this limitation.
Using a scope function and a calculation that calls this function to retrieve the related data as an array (don’t forget to set type to media, otherwise you get [Object object] results when returning an array),
to then use this in our customcomponent to display the records with a handler towards the server that then opens a pop-up in which the related data is loaded for editing.
Not optimal, not exactly the interactability I was looking for.
But a far safer bet with the readonly display of data rather than writing all sorts of JSON validators and update functions that can easily break or become a hard to debug mess.
If you do decide to work on something custom because you need to and you want to get into advanced foundset updating, I would recommend taking a look at Servoy’s github repos to see what they do with their components server-side logic.