| [Databinding] WidgetProperties.focused() value property not working [message #496383] |
Mon, 09 November 2009 14:52  |
Eclipse User |
|
|
|
Hi all, I have a problem with the focused property value.
I'm creating an observable value, which is observing the property "focused" in the text widget. But this observable value changes only when the text gain the focus, but not if lost it. To test that , I've bound a checkbox to this observable value.
Finally, I've add a listener to the text, and the listener is working fine, but the observable value is not refreshing its value at all.
I think that it is a misunderstanding on my part, conceptually speaking.
Here the code:
this.text.addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
System.out.println("FOCUS LOST");
}
@Override
public void focusGained(FocusEvent e) {
System.out.println("FOCUS GAINED");
}
});
IObservableValue textFocusObservable = WidgetProperties.focused().observe(this.text);
//data binding context
dbc.bindValue(WidgetProperties.selection().observe(this.check), textFocusObservable);
Thanks on advance,
Juan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04031 seconds