gpt4 book ai didi

Vaadin SQLContainer刷新

转载 作者:行者123 更新时间:2023-12-01 14:29:01 26 4
gpt4 key购买 nike

Vaadin book说:

Normally, the SQLContainer will handle refreshing automatically when required.

但是,这是在哪里定义的呢?容器多久刷新一次?

我已经尝试过测试但无法解决

最佳答案

您可以简单地检查SQLContainer代码。

短语

Normally, the SQLContainer will handle refreshing automatically when required.

表示 SQLContainer 将在对其状态进行一些更改后自行刷新。例如,在添加 orderBy 后,refresh() 将被调用:

   /**
* Adds the given OrderBy to this container and refreshes the container
* contents with the new sorting rules.
*
* Note that orderBy.getColumn() must return a column name that exists in
* this container.
*
* @param orderBy
* OrderBy to be added to the container sorting rules
*/
public void addOrderBy(OrderBy orderBy) {
if (orderBy == null) {
return;
}
if (!propertyIds.contains(orderBy.getColumn())) {
throw new IllegalArgumentException(
"The column given for sorting does not exist in this container.");
}
sorters.add(orderBy);
refresh();
}

所有其他操作都是如此(请注意 refresh() 调用):

  public void rollback() throws UnsupportedOperationException, SQLException {
debug(null, "Rolling back changes...");
removedItems.clear();
addedItems.clear();
modifiedItems.clear();
refresh();
}

关于Vaadin SQLContainer刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17866533/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com