I don’t get you where you find the chat template
First, your domain model should be something like this:
Every chat entity contains several Message entities. So, the outer dataview is the chat entity while the nested listview contains all associated messages. The nested dataview at the bottom should be for new messages.
In the end, you should get something like this as a starting point for further modifying:
PS: Sorry for two answers. I’m struggeling with Forum answering function. Doesn’t seem to work as planned atm.