Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid.getSortDirection() issue

    Hi,

    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
    Here is the sample code to replicate the exception:

    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;
    	}
    DataSource:
    Code:
    public class ListGridDataSource extends DataSource {
    	public ListGridDataSource() {
    		DataSourceTextField name = new DataSourceTextField("name");
    
    		setFields(name);
    		setClientOnly(true);
    	}
    }
    I've tried using the nightly build 353 (26-02-2009).

    Dogan

    #2
    Still experiencing the same issue with the revision 360 (03-03-2009).

    Anybody else?

    Comment


      #3
      I faced the same issue

      Hi,

      I got the same issue when i tried to use this method.

      Any fix yet?

      Thanks.

      Comment


        #4
        Please file an issue for this.

        Comment


          #5
          Fixed in SVN.

          Comment

          Working...
          X