I have a custom view that is bound to a list of name value pairs. I open the coach containing the view make the changes and afterwards the values are not reflective of the changes I made. I have dumped out the data from the bound object when I change it and it has the correct data but when I dump it on the server side, the values are not correct ( original values ). Since it is a list and not a simple datatype I could be updating it improperly. I am desiring to replace the value of the value property of an existing item in the list. I am essentially setting the value like this:
var boundObject = this.context.binding.get("value");
boundObject.itemsboundIndex.value = newValue;
It there another way? Or what is the appropriate way?
This topic has been locked.
3 replies Latest Post - 2013-02-11T04:06:20Z by kolban
Pinned topic Bound object doesn't update
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-11T04:06:20Z at 2013-02-11T04:06:20Z by kolban
Re: Bound object doesn't update2013-02-07T01:29:56Z in response to SystemAdminI have found that the custom code works fine if it is a single view but if it is a sub-view then the data is not properly transferred back to the coach. I have dumped the data in the parent view and that is accurate but after the coach it is back to the original values. Again, I could be doing something enormously stupid. Any help would be greatly appreciated.
kolban 10000004463314 PostsACCEPTED ANSWER
Re: Bound object doesn't update2013-02-11T04:06:20Z in response to SystemAdminLooking at the docs found here ...
I would say:
var myList = this.context.binding.get( "value"); var myListEntry = myList.get(myIndex); myListEntry.myField = "My New Value"; myList.put(myIndex, myListEntry);