I'm working on a GWT app . I have this method :
public void executeFetch(final String requestId, final DSRequest request, final DSResponse response) {
Record[] list;
list = new Record[3];
//
Record rec1 = new Record();
rec1.setAttribute("id", "-1");
rec1.setAttribute("name", "All");
list[0] = (rec1);
//
Record rec2 = new Record();
rec2.setAttribute("id", "A");
rec2.setAttribute("name", "Active");
list[1] = (rec2);
//
Record rec3 = new Record();
rec3.setAttribute("id", "C");
rec3.setAttribute("name", "Inactive");
list[2] = (rec3);
//
response.setData(list);
processResponse(requestId, response);
}
When debuging I see this warning :
WARN:Log:setData(): DSResponse data is expected to be an array of ListGridRecords. This allows the data to be displayed as expected in ListGrids bound to this dataSource.
I don't get where the problem is ?
you need to use a ListGridRecord instead of Record https://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/grid/ListGridRecord.html