• 1 reply
  • Latest Post - ‏2013-01-04T22:57:41Z by kolban
7615 Posts

Pinned topic When the variable in views take the effect using binding.set?

‏2013-01-04T21:23:09Z |
I am working on BPM V8 and I built my human services using many views, and inside my views I used set binding as follows:

this.context.binding.set("value",new value);

does this mean that the variable should take the new value on the view or it will not be taken unless we pressed submit button on the coach and then the new values is taken, because when I running the human service one of my view apply and "onchange" event and inside it I used "" but when I press"X" (close the coach" before submit and open it again I didn't find that the variable take the effect. so when the variable should take the effect and how could I make "X" to save my variable?
Updated on 2013-01-04T22:57:41Z at 2013-01-04T22:57:41Z by kolban
  • kolban
    3317 Posts

    Re: When the variable in views take the effect using binding.set?

    When a Coach View is added to a Coach, that Coach View can be associated with a piece of data such as a variable defined in the Human Service. The association of the coach view to a variable is called data binding. It is highly likely that data binding with be used extensively with most custom Coach Views … after all, a Coach View that doesn't display some configurable data probably isn't that useful.

    When a Coach View is displayed in the browser, a copy of the value of that variable is brought from the server and stored as data associated with the Coach View. It is this copy that is used with getters and setters when the Coach View code accesses the data. When a boundary event trigger occurs, the current value of the variable in the Coach View is then sent back to the server and stored in the original variable from which the copy was taken in the first place. This is key. If one uses a Coach View, changes some data and then closes the browser window without first submitting a boundary trigger, the data is not sent back to the run-time environment. In addition, once a Coach View is shown, should there be any changes (somehow) to the values of the variables in the Human Service in the run-time, these changes will not be reflected in the Coach View as it will already have loaded a copy of the original values when it was displayed.