Currently you have to write a lot of code to display a collection of models. You have to create a ViewCollection with template and then bind a ModelCollection to the ViewCollection.
This should be easier with less to code. alamid could provide a special foreach data-binder that is used like this:
alamid detects the foreach-binder, creates a ViewCollection with the ul-tag as root-node and everything below as template for each view. Finally the users-collection is bound to the created ViewCollection.
We have to be careful here, because everything below the foreach-tag should not be part of the current view, but the created child views. Therefore these tags should not show up under nodes (former nodeMap)
I still think, that there are many cases where you should rather create a separated list view instead of embedding them like here. But there are also simple cases where this functionality is more elegant.
Currently you have to write a lot of code to display a collection of models. You have to create a ViewCollection with template and then bind a ModelCollection to the ViewCollection.
This should be easier with less to code. alamid could provide a special foreach data-binder that is used like this:
alamid detects the foreach-binder, creates a ViewCollection with the ul-tag as root-node and everything below as template for each view. Finally the users-collection is bound to the created ViewCollection.
We have to be careful here, because everything below the foreach-tag should not be part of the current view, but the created child views. Therefore these tags should not show up under
nodes
(formernodeMap
)I still think, that there are many cases where you should rather create a separated list view instead of embedding them like here. But there are also simple cases where this functionality is more elegant.