[DataBinding] how to get the modified javabean property? [message #312250] |
Mon, 05 February 2007 11:59  |
Eclipse User |
|
|
|
Originally posted by: sudhakar.co.brazos.tx.us
I'm looking for examples on how to use JFace Databinding to persist
specific properties of a JavaBean.
I can access the JavaBean object in the handleBindingEvent(BindingEvent
e) method. But how do I determine which property was modified?
Here is my DataBindingContextFactory class.
public class DataBindingContextFactory {
public static DataBindingContext create(final Person person) {
DataBindingContext bindingContext = new DataBindingContext(
SWTObservables.getRealm(Display.getDefault()));
bindingContext.addBindingEventListener(new IBindingListener() {
public IStatus handleBindingEvent(BindingEvent e) {
if (e.copyType == BindingEvent.EVENT_COPY_TO_MODEL
&& e.pipelinePosition == BindingEvent.PIPELINE_AFTER_CHANGE) {
// how to determine what property was changed?
return Status.OK_STATUS;
}
});
return bindingContext;
}
}
Thanks
-sud
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04273 seconds