SNAPSHOT_v9.1d_2013-10-25/LGPL Development Only (built 2013-10-25)
If the ListGrid has a summary and removal is deferred, it is not possible to mark more than one record as removed :
1. Click on the remove icon for the first record : record is marked as removed
2. Click on the remove icon for the second record : record is marked as removed
3. Move the cursor over the first record or loose the browser's focus and get back the focus (there is a refresh) : the first record is back to normal !
However, the behavior is as expected if the grid summary is not
used.
If the ListGrid has a summary and removal is deferred, it is not possible to mark more than one record as removed :
1. Click on the remove icon for the first record : record is marked as removed
2. Click on the remove icon for the second record : record is marked as removed
3. Move the cursor over the first record or loose the browser's focus and get back the focus (there is a refresh) : the first record is back to normal !
However, the behavior is as expected if the grid summary is not
used.
Code:
ListGrid grid = new ListGrid();
grid.setDataSource(new SandboxDataSource());
grid.setAutoFetchData(true);
grid.setUseAllDataSourceFields(true);
grid.setShowGridSummary(true);
grid.setCanRemoveRecords(true);
grid.setAutoSaveEdits(false);Code:
public class SandboxDataSource extends DataSource {
private static final SandboxDataSource instance = new SandboxDataSource();
public static SandboxDataSource getInstance() {
return instance;
}
public SandboxDataSource() {
final String url="sandbox_data.xml";
setRecordXPath("/List/Person");
DataSourceIntegerField id = new DataSourceIntegerField("id");
id.setPrimaryKey(true);
DataSourceTextField firstname = new DataSourceTextField("firstname");
DataSourceTextField lastname = new DataSourceTextField("lastname");
DataSourceIntegerField age = new DataSourceIntegerField("age");
DataSourceIntegerField value = new DataSourceIntegerField("value");
setFields(id, firstname, lastname, age, value);
setClientOnly(true);
setDataURL(url);
}
}Code:
<List>
<Person><id>1</id><firstname>Walter</firstname><lastname>White</lastname><age>38</age><value>10</value></Person>
<Person><id>2</id><firstname>Luke</firstname><lastname>Skywalker</lastname><age>30</age><value>20</value></Person>
<Person><id>3</id><firstname>Bilbo</firstname><lastname>Baggins</lastname><age>5</age><value>69</value></Person>
</List>