|
|
Re: xwt databinding trouble [message #902292 is a reply to message #902243] |
Thu, 16 August 2012 20:05 |
Jürgen Weinberger Messages: 42 Registered: August 2012 |
Member |
|
|
Hey! thanks for the fast reply
Now i had time to try out your proposal and changed the code to
package helloworld;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.eclipse.swt.widgets.Event;
public class TestMe {
private String testText;
private PropertyChangeSupport support = new PropertyChangeSupport(this);
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
support.addPropertyChangeListener(propertyName, listener);
}
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
support.removePropertyChangeListener(propertyName, listener);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
}
public TestMe() {
setTestText("This is a Test");
}
public String getTestText() {
return testText;
}
public void setTestText(String testText) {
support.firePropertyChange("testText", this.testText, testText);
this.testText = testText;
}
public void onSelection(Event event) {
System.out.println(testText);
setTestText("Hello World");
}
}
I found the propertyChange code from an old tutorial with jface databinding and there it worked. Also the breakpoint at addSupportListener(..,..) is reached (with propertyName="testText" and a BeanValueProperty. But unfortunately i got still the same results.
Thanks for the help . Maybe you have any other suggestion? (maybe some class or jar i forgot, but there's no error message).
Could this be a problem with the realms. I don't looked into that topic in details.
What i don't understand is, why the data- and eventbinding works at the startup but the data doesn't get updated later.
Is there any documentation about xwt, i can't find something realy usefull?
regards weinma
[Updated on: Thu, 16 August 2012 20:12] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03047 seconds