Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bug with listgrid setStopOnErrors property

$
0
0
Running SmartClient Version: v10.0p_2015-08-31
SmartGWT 5.0

On Chrome 44.0.2403.157

Preparation steps:
1. Create a ListGrid with single cell editing.
3. Set to true ListGrid properties of setWaitForSave and setStopOnErrors;

Steps to represent the bug:
1. Click on any cell to edit it.
2. Click on any other cell to cancel editing.
3. Click on the third cell to edit it.

Bug behaviour:
After clicking on the third cell, u'll go editing the cell, that u've clicked before, to exit the editor mode, but not to the cell, that u've clicked right now.

Code to represent the bug: .

public class StopOnErrorsListGrid extends ListGrid{

public StopOnErrorsListGrid() {
List<ListGridField> fields = new ArrayList<>();
for (int i = 0; i < 10; i++) {
ListGridField field = new ListGridField("field" + i, "field" + i, 100);
fields.add(field);
}

setWaitForSave(true);
setStopOnErrors(true);
setCanEdit(true);
setEditByCell(true);
setEditEvent(ListGridEditEvent.CLICK);
setCanSelectCells(true);
setFields(fields.toArray(new ListGridField[fields.size()]));

List<ListGridRecord> records = new ArrayList<>();
{
for (int j = 0; j < 20; j++) {
ListGridRecord rec = new ListGridRecord();
for (int i = 0; i < 10; i++) {
rec.setAttribute("field" + i, i);
}
records.add(rec);
}
}
setData(records.toArray(new ListGridRecord[records.size()]));
}
}

Attached Images
File Type: jpg 1.jpg (76.5 KB)
File Type: jpg 2.jpg (75.9 KB)
File Type: jpg 3.jpg (84.7 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles