Vaadin SQLContainer刷新
报告说: 通常,SQLContainer将在需要时自动处理刷新 然而,这个定义在哪里?容器多久刷新一次 我尝试过测试这个问题,但无法解决您只需检查代码即可 短语 通常情况下,SQLContainer将在以下情况下自动处理刷新: 必需的 这意味着SQLContainer将在对其状态进行某些更改后刷新自身。例如,添加orderBy后,将调用refresh():Vaadin SQLContainer刷新,vaadin,vaadin7,Vaadin,Vaadin7,报告说: 通常,SQLContainer将在需要时自动处理刷新 然而,这个定义在哪里?容器多久刷新一次 我尝试过测试这个问题,但无法解决您只需检查代码即可 短语 通常情况下,SQLContainer将在以下情况下自动处理刷新: 必需的 这意味着SQLContainer将在对其状态进行某些更改后刷新自身。例如,添加orderBy后,将调用refresh(): /** * Adds the given OrderBy to this container and refreshes t
/**
* 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()call):
public void rollback() throws UnsupportedOperationException, SQLException {
debug(null, "Rolling back changes...");
removedItems.clear();
addedItems.clear();
modifiedItems.clear();
refresh();
}