[Databinding] Problems with multiple actions in a checkbox [message #940439] |
Thu, 11 October 2012 16:33 |
Mauricio Reyes Messages: 26 Registered: August 2011 |
Junior Member |
|
|
Hi, I'm having a problem with an SWT Dialog, where I've one Checkbox and one Text. When checkbox is changed setBooleanAttribute(boolean value) method is called through databinding, and after setting the attribute, the method changes the value of another attribute, which is binded to the Text component.
The issue I'm facing is the update of Text value, that is not being modified when the model's attribute changes through setBooleanAttribute.
I'm generating the binding with Window Builder and model elements are two separate objects. The following code is the generated binding and a simplified example version of the triggered sets explained before:
IObservableValue btnManejaDominioObserveSelectionObserveWidget_1 = SWTObservables.observeSelection(btnManejaDominio);
IObservableValue controladorManejaDominioObserveValue = PojoObservables.observeValue(controlador, "manejaDominio");
bindingContext.bindValue(btnManejaDominioObserveSelectionObserveWidget_1, controladorManejaDominioObserveValue, null, null);
IObservableValue textObserveTextObserveWidget = SWTObservables.observeText(text, SWT.Modify);
IObservableValue controladorDominioAdapternombreObserveValue = PojoObservables.observeValue(controlador, "dominioAdapter.nombre");
bindingContext.bindValue(textObserveTextObserveWidget, controladorDominioAdapternombreObserveValue, null, null);
// FIRST SET (Boolean)
public void setManejaDominio(Boolean manejaDominio) {
this.manejaDominio = manejaDominio;
this.dominioAdapter.setNombre("Default Nombre");
}
// SECOND SET (Called from the first)
public void setNombre(String nombre){
this.nombre = nombre;
}
I'm not sure if databinding is wrongly configured or has to do with composite layout. When I debug the values are properly set in the model.
How can I react to those model changes in GUI?
Thanks in advance
Mauricio
|
|
|
|
Powered by
FUDForum. Page generated in 0.03048 seconds