|
Re: Modify the update strategy of a binding after creation [message #1362828 is a reply to message #1353030] |
Sat, 17 May 2014 21:09 |
Erdal Karaca Messages: 854 Registered: July 2009 |
Senior Member |
|
|
You should call Binding.dispose(), then you can re-bind the observables with new policies, DatabindingContext.removeBinding() will just remove it from its internal list (without de-coupling the observables)...
Xavipen Mising name wrote on Tue, 13 May 2014 20:53Hi,
Is there a way to modify the Update Policy in an already created binding, like:
//Pseudocode
Binding b = context.bindValue(uiElement, modelElement, targetToModel ( POLICY_NEVER ), modelToTarget (POLICY_UPDATE));
....
//Some condition
b.setTargetToModel(POLICY_UPDATE)
b.setModelToTarget(POLICY_NEVER)
As an alternative I have also try to remove the binding from the databinding context. like: One Action will call dataBindingContext.removeBinding(myBinding);
another dataBindingContext.addBinding(myBinding);
However, after running dataBindingContext.removeBinding(myBinding) I still see the changes in the UI.
Is there a way to "activate"/"deactivate" bindings? Could someone point my in the right direction?
Thanks in Advance
Javi
|
|
|
|
Powered by
FUDForum. Page generated in 0.03309 seconds