Validation CellTable保留TextInputCell旧值
我使用带有EditTextCell的CellTable 当EditTextCell启动FieldUpdater时,我想进行验证,如果验证失败,将EditTextCell设置为旧值。但是我找不到如何更新CellTable或指定的行 下面是一段代码:Validation CellTable保留TextInputCell旧值,validation,gwt,celltable,Validation,Gwt,Celltable,我使用带有EditTextCell的CellTable 当EditTextCell启动FieldUpdater时,我想进行验证,如果验证失败,将EditTextCell设置为旧值。但是我找不到如何更新CellTable或指定的行 下面是一段代码: titleColumn.setFieldUpdater(new FieldUpdater<QuestionDto, String>() { @Override public void update(int index, Q
titleColumn.setFieldUpdater(new FieldUpdater<QuestionDto, String>() {
@Override
public void update(int index, QuestionDto object, String value) {
if (!isValid(value))
// Here I need to set the EditTextCell to the value in my object
else
// It's valid I do the work
}
});
但它也不起作用。我对EditTextCell不是很了解,但对于其他小部件,我会捕获ChangeEvent(是否可以捕获您正在使用的单元格?),然后调用event.stopPropagation(),如果我不希望用户操作产生任何效果
table.setRowData(dataProvider.getList());