Closed GoogleCodeExporter closed 8 years ago
Please do not post issues without a standalone test case. Marking invalid
until one is provided.
Original comment by smartgwt...@gmail.com
on 16 Apr 2012 at 4:07
Here is the smallest test case:
public void onModuleLoad() {
DataSourceTextField continentField = new DataSourceTextField("continent");
continentField.setPrimaryKey(true);
DataSource dataSource = new DataSource();
dataSource.setClientOnly(true);
dataSource.setFields(continentField);
for (CountryRecord record : new CountryData().getNewRecords()) {
dataSource.addData(record);
}
ListGrid myGrid = new ListGrid();
myGrid.setWidth(200);
myGrid.setHeight(100);
myGrid.setDataSource(dataSource);
myGrid.fetchData();
myGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
myGrid.setSelectionType(SelectionStyle.SIMPLE);
myGrid.draw();
}
class CountryData {
public CountryRecord[] getNewRecords() {
return new CountryRecord[] {
new CountryRecord("North America"),
new CountryRecord("Asia") };
}
}
class CountryRecord extends ListGridRecord {
public CountryRecord(String continent) {
setContinent(continent);
}
public void setContinent(String continent) {
setAttribute("continent", continent);
}
public String getContinent() {
return getAttributeAsString("continent");
}
}
Original comment by sta191...@gmail.com
on 17 Apr 2012 at 8:09
Usage error: don't use addData() to populate a clientOnly DataSource, use
setCacheData().
Still invalid.
Original comment by smartgwt...@gmail.com
on 17 Apr 2012 at 6:17
There is still 1 error. When you deselect at least one of the rows, the header
remains selected. Whereas if you select all rows, the header becomes selected.
Is this normal?
Original comment by sta191...@gmail.com
on 18 Apr 2012 at 8:03
We're not reproducing this and there are autotests showing this working fine.
We suspect whatever code you're testing with is not what you've posted here.
Original comment by smartgwt...@gmail.com
on 18 Apr 2012 at 5:31
Here is the code I used:
public void onModuleLoad() {
DataSourceTextField continentField = new DataSourceTextField("continent");
continentField.setPrimaryKey(true);
DataSource dataSource = new DataSource();
dataSource.setClientOnly(true);
dataSource.setFields(continentField);
//Setting the cached Data
//-----------------------------------------------------------
dataSource.setCacheData(new CountryData().getNewRecords());
//----------------------------------------------------------
ListGrid myGrid = new ListGrid();
myGrid.setWidth(200);
myGrid.setHeight(100);
myGrid.setDataSource(dataSource);
myGrid.fetchData();
myGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
myGrid.setSelectionType(SelectionStyle.SIMPLE);
myGrid.draw();
}
class CountryData {
public CountryRecord[] getNewRecords() {
return new CountryRecord[] {
new CountryRecord("North America"),
new CountryRecord("Asia") };
}
}
class CountryRecord extends ListGridRecord {
public CountryRecord(String continent) {
setContinent(continent);
}
public void setContinent(String continent) {
setAttribute("continent", continent);
}
public String getContinent() {
return getAttributeAsString("continent");
}
}
Original comment by sta191...@gmail.com
on 19 Apr 2012 at 10:00
Original comment by smartgwt...@gmail.com
on 19 Apr 2012 at 9:43
Original comment by smartgwt...@gmail.com
on 19 Apr 2012 at 9:43
Do you have any deadline for the fix?
Original comment by sta191...@gmail.com
on 1 May 2012 at 2:23
This has been fixed in the latests code stream (SC 8.3d / SGWT 3.1d)
Original comment by smartgwt...@gmail.com
on 8 May 2012 at 10:52
Actually a duplicate of an issue reported on the SmartClient forums:
http://forums.smartclient.com/showthread.php?t=21976
Original comment by smartgwt...@gmail.com
on 8 May 2012 at 10:55
[deleted comment]
[deleted comment]
Using the latest version of SmartGWT 3.0 downloaded from the below link, this
issue is still present.
http://www.smartclient.com/product/download-bounce.jsp?product=smartgwt&license=
lgpl&version=3 .0p&nightly=true
Original comment by sta191...@gmail.com
on 9 May 2012 at 2:06
Original issue reported on code.google.com by
sta191...@gmail.com
on 16 Apr 2012 at 3:09