I'm using jsViews to build a small app. I have a input form section in which I want to provide a cancel button and a save button.
My goal is very similar to the linkTo section of the documentation.
However, my data-link is a bit more complex. I didn't find the correct syntax to bind data back to my editing object.
Here's what I have:
<input type="text"
data-link="{:Data.ListName:Editing.ListName}
id{:'txtListName_' + #getIndex()}" >
The textbox is populated with my backend data, but when I submit my form, I can't see the updated value. Neither in Data.ListName property nor in Editing.ListName.
I also tried:
<input type="text"
data-link="{:Data.ListName} linkTo{:Editing.ListName}
id{:'txtListName_' + #getIndex()}" >
<input type="text"
data-link="{:Data.ListName} linkTo=Editing.ListName
id{:'txtListName_' + #getIndex()}" >
But none of this works. The documentation is unclear regarding my issue.
What's the correct syntax ?
Ok, I managed to find the correct syntax, which is :
<input type="text"
data-link="{:Data.ListName linkTo=Editing.ListName:}
id{:'txtListName_' + #getIndex()}" >