Topic
  • 3 replies
  • Latest Post - ‏2013-02-11T04:06:20Z by kolban
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Bound object doesn't update

‏2013-02-06T23:55:01Z |
Greetings -

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;
this.context.binding.set("value", boundObject);

It there another way? Or what is the appropriate way?

Thanks
Mike
Updated on 2013-02-11T04:06:20Z at 2013-02-11T04:06:20Z by kolban
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Bound object doesn't update

    ‏2013-02-06T23:55:42Z  
    Version 8.0.0
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Bound object doesn't update

    ‏2013-02-07T01:29:56Z  
    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.

    Thanks
  • kolban
    kolban
    3316 Posts

    Re: Bound object doesn't update

    ‏2013-02-11T04:06:20Z  
    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.

    Thanks
    Looking at the docs found here ...

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0m1/topic/com.ibm.wbpm.wle.editor.doc/develop/topics/rbindingdata.html

    I would say:

    
    var myList = this.context.binding.get(
    "value"); var myListEntry = myList.get(myIndex); myListEntry.myField = 
    "My New Value"; myList.put(myIndex, myListEntry);