Revision history [back]

click to hide/show revision 1
initial version

answered 2015-09-25 05:55:54 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

I did check your code,

You actually don't need the Command because you can handle it already in the TestObserver already.

public class TestObserver implements TestObserverForm{

  @Override
    public void update(final TestObservableForm observable, final String field) {
        observable.setField("value", String.format("Data setted when %s changed!", field));
      BindUtils.postNotifyChange(null,null,observable,"value");
    }
}

Small explication :

The setField will trigger the change of that specific field.
You update another field in the back but the binder has no clue that you did this.
So the only thing what you can do is notify the binder that something extra has changed.

Your idea was good, to notify the binder.
Just you make it yourself a little harder then it should have been.

Chill.

I did check your code,

You actually don't need the Command because you can handle it already in the TestObserver already..

public class TestObserver implements TestObserverForm{

  @Override
    public void update(final TestObservableForm observable, final String field) {
        observable.setField("value", String.format("Data setted when %s changed!", field));
      BindUtils.postNotifyChange(null,null,observable,"value");
    }
}

Small explication :

The setField will trigger the change of that specific field.
You update another field in the back but the binder has no clue that you did this.
So the only thing what you can do is notify the binder that something extra has changed.

Your idea was good, to notify the binder.
Just you make it yourself a little harder then it should have been.

Chill.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More