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?
Re: Bound object doesn't update2013-02-07T01:29:56ZThis is the accepted answer. This is the accepted answer.I 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 10000004463319 Posts
Re: Bound object doesn't update2013-02-11T04:06:20ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
I would say:
var myList = this.context.binding.get( "value"); var myListEntry = myList.get(myIndex); myListEntry.myField = "My New Value"; myList.put(myIndex, myListEntry);