0

我想知道当用户在字段中设置值时是否有一个函数会触发,但如果程序在字段中设置值则不会。

所以功能:

user click on field 'myField and change value -> method fires up
in program : myField.setValue = SomeValue; -> method doesn't fires up.

问题在于循环检测。如果您的逻辑是您有 4 个字段并尝试检测这些字段中的任何一个是否已更改,然后触发方法以更改这些字段中的某些值:

@Override
protected void execChangedValue() throws ProcessingException {
  super.execChangedValue();
  valueFieldsChange(this);
}

protected void valueInPriceBoxFieldsChange(AbstractValueField field) {
    ... calculate some values in those fields....
}

我得到:

!MESSAGE org.eclipse.scout.rt.client.ui.form.fields.AbstractValueField.setValue(AbstractValueField.java:338) Loop detection in...

所以我知道这个方法execChangedValue()不是我想要的。是否有具有解释行为的类似方法?

马尔科

4

1 回答 1

1
于 2015-01-26T06:02:41.427 回答