PDA

View Full Version : [FIXED] RowEditor: Fields reused without init state



MrExt
5 Jun 2009, 5:29 AM
Not initialing originalvalues of reused fields cause that future rows to not detecting changes (field dirty) when the new value is equal to the original of previous row editing.

publicvoid startEditing(int rowIndex, boolean doFocus) {


for (int i = 0, len = cm.getColumnCount(); i < len; i++) {
Field<Object> f = (Field<Object>) getItem(i);
String dIndex = cm.getDataIndex(i);
Object val = cm.getEditor(i).preProcessValue(record.get(dIndex));
f.setValue(val);
-> f.updateOriginalValue(val);
values.add(val);
}


}

sven
5 Jun 2009, 5:30 AM
Please post a complete testcase that is demonstrating the issue.

sven
5 Jun 2009, 5:36 AM
Got it. thanks for reporting.

MrExt
5 Jun 2009, 5:36 AM
I will try next week.
Only to clarify: I know RowEditor has its own isDirty() and does not check against originalValues but Store/Grid or GridView yes. So the changes are not reflected in the grid.

MrExt
5 Jun 2009, 5:37 AM
Got it. thanks for reporting.
Perfect. Thanks

sven
5 Jun 2009, 6:05 AM
Fixed in SVN.