Hi,
I updated to the latest nightly build (06-30-2011). There is some improvement, but it still isn't working properly. I also found a new issue.
CURRENT ISSUE:
If I have setCacheAllData(true) on the datasource, now the data is fetched from the server (unlike with the previous version), however, nothing is loaded in the grid. Using Firebug, I can see the XML file content coming over to the client, but no data is loaded in the grid. This is different from the earlier behavior. Earlier, the fetch itself was not working, and the servlet was not getting called at all.
So, there is some improvement now, but setCacheAllData(true) is still "not" working correctly.
NEW ISSUE:
If I have a fetch Criteria on the grid, the Criteria does "not" seem to have any effect. All the data is fetched on the grid. Here's the code for the new issue. The only modification is the addition of a Criteria to the fetchData call.
TestDS.java (for NEW ISSUE only):
Thanks.
I updated to the latest nightly build (06-30-2011). There is some improvement, but it still isn't working properly. I also found a new issue.
CURRENT ISSUE:
If I have setCacheAllData(true) on the datasource, now the data is fetched from the server (unlike with the previous version), however, nothing is loaded in the grid. Using Firebug, I can see the XML file content coming over to the client, but no data is loaded in the grid. This is different from the earlier behavior. Earlier, the fetch itself was not working, and the servlet was not getting called at all.
So, there is some improvement now, but setCacheAllData(true) is still "not" working correctly.
NEW ISSUE:
If I have a fetch Criteria on the grid, the Criteria does "not" seem to have any effect. All the data is fetched on the grid. Here's the code for the new issue. The only modification is the addition of a Criteria to the fetchData call.
TestDS.java (for NEW ISSUE only):
Code:
package com.dfb.test.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.data.Criteria; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; import com.smartgwt.client.widgets.layout.VLayout; public class TestRestDS implements EntryPoint { public final TestXMLDS testDS = TestXMLDS.getInstance(); public void onModuleLoad() { //testDS.setCacheAllData(true); <- Commented out for testing VLayout rootLayout = new VLayout(); rootLayout.setPadding(20); rootLayout.setMembersMargin(20); final ListGrid grid = new ListGrid(); grid.setWidth(200); grid.setHeight(300); grid.setDataSource(testDS); final Criteria findName1 = new Criteria(); findName1.addCriteria("name", "name1"); IButton button1 = new IButton("Load data"); button1.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { grid.fetchData(findName1); } }); IButton button2 = new IButton("Clear data"); button2.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { grid.setData(new ListGridRecord[] {}); } }); ListGridField field = new ListGridField("name", "Name"); grid.setFields(field); rootLayout.setMembers(grid, button1, button2); rootLayout.draw(); } }
Comment