我遇到了非常奇怪的行为,我不知道这是故意的还是侦察兵内部的错误。(我可以理解为什么这可能是一个功能,但是我需要一些解决方法......)
我有一些表格里面的表格。假设我有两列Column A
并且Column B
有两行。
------------------------
| Column A | Column B |
------------------------
| 10 | 20 |
------------------------
| 30 | 40 |
------------------------
如果我像这样检查客户的最后一行:
getTField().getTable().getAColumn().getValue(getTField().getTable().getRowCount() -1) = 30
final TFormData formData = new TFormData();
this.exportFormData(formData);
formData.getTable().getAColumn(formData.getTable().getRowCount() - 1) = 30
这没关系。现在我更新最后一行并删除第一行,所以现在看起来像这样:
------------------------
| Column A | Column B |
------------------------
| 60 | 40 |
------------------------
现在如果我尝试和以前一样:
// row count = 1
getTField().getTable().getAColumn().getValue(getTField().getTable().getRowCount() -1) = 60
final TFormData formData = new TFormData();
this.exportFormData(formData);
// row count = 2
formData.getTable().getAColumn(formData.getTable().getRowCount() - 1) = 30
formData.getTable().getAColumn(formData.getTable().getRowCount() - 2) = 60
像上一个(已删除)行一样保留在表单数据中。
我知道将已创建的行更新为当前值比替换所有行更快,但不应该 getRowCount
返回正确的数字?