Hi,
Calls to ListGrid.getSortDirection() return an exception:
Here is the sample code to replicate the exception:
EntryPoint:
DataSource:
I've tried using the nightly build 353 (26-02-2009).
Dogan
Calls to ListGrid.getSortDirection() return an exception:
Code:
[ERROR] Uncaught exception escaped java.lang.IllegalArgumentException: Something other than a Java object was returned from JSNI method '@com.smartgwt.client.widgets.BaseWidget::getPropertyAsString(Ljava/lang/String;)': Cannot convert to type java.lang.Object from boolean
EntryPoint:
Code:
public void onModuleLoad() { ListGrid listGrid = new ListGrid(); listGrid.setFields(new ListGridField("name", "Name")); ListGridDataSource listGridDataSource = new ListGridDataSource(); listGrid.setDataSource(listGridDataSource); RootPanel.get().add(listGrid); listGrid.draw(); listGridDataSource.setTestData(getListGridData(10)); listGrid.fetchData(); listGrid.getSortDirection(); } private ListGridRecord[] getListGridData(int arraySize) { ListGridRecord[] listGridRecords = new ListGridRecord[arraySize]; for (int i = 0; i < arraySize; i++) { listGridRecords[i] = new ListGridRecord(); listGridRecords[i].setAttribute("name", "Node " + i); } return listGridRecords; }
Code:
public class ListGridDataSource extends DataSource { public ListGridDataSource() { DataSourceTextField name = new DataSourceTextField("name"); setFields(name); setClientOnly(true); } }
Dogan
Comment