是否可以刷新vaadin table组件的单行?
到目前为止,如果表行编辑完成,我只是刷新整个表:
table.refreshRowCache();
但是这可能会导致大型表的性能问题.那么,如何刷新单行呢?
我在 Vaadin 论坛上发现了这个似乎很有用:https://vaadin.com/forum/#! /thread/408555/408554
我还没有尝试过,但是 Henri Sara(Vaadin 开发者)建议了这个解决方案:
Property statusProperty = pqTable.getContainerProperty(itemId, "statusString");
if (property instanceof MethodProperty) {
((MethodProperty) statusProperty).fireValueChange();
}
Run Code Online (Sandbox Code Playgroud)
他还指出,这种方法可能会在未来版本中发生变化(并且可能已经这样做了:S)
| 归档时间: |
|
| 查看次数: |
4906 次 |
| 最近记录: |