Currently, the component function in our expression language works with components that have simpleBinding only. Now that we have list and object support, we should extend it to work with all kinds of bindings.
Proposed solution
For group bindings
Non-repeating groups: Return an object with the ID's of the sub components as keys. The value of each key should be whatever component would return for that component.
Repeating groups: Return a list of objects, each of which is built the same way as for non-repeating groups.
We still need to decide what should happen with hidden components. Here are the alternatives:
- Hide the ID's completely from the returning objects
- Return
null for the hidden values
- Reveal the structure of all lists and objects (inlcuding nested ones), but with
null for each hidden,value with a primitve type (for better type safety)
For other bindings
If the component is hidden, return null. Otherwise, return an object with the binding names as keys and whatever dataModel would return for that key as values.
Currently, the
componentfunction in our expression language works with components that havesimpleBindingonly. Now that we have list and object support, we should extend it to work with all kinds of bindings.Proposed solution
For
groupbindingsNon-repeating groups: Return an object with the ID's of the sub components as keys. The value of each key should be whatever
componentwould return for that component.Repeating groups: Return a list of objects, each of which is built the same way as for non-repeating groups.
We still need to decide what should happen with hidden components. Here are the alternatives:
nullfor the hidden valuesnullfor each hidden,value with a primitve type (for better type safety)For other bindings
If the component is hidden, return
null. Otherwise, return an object with the binding names as keys and whateverdataModelwould return for that key as values.