Hi,
When a listgridfield is set to display an another field with setDisplayField the options in filter editor's select list contain duplicate values. Reproducable with:
When running the code above the "someid" field's filter editor shows _all_ title values from records and "someid" has only '', 1 and 2 values specified. The filtering itself seems to work so the valuemap probably just contains duplicate entries for all records.
Using 4.0p 2013-10-22 nightly.
br,
Marko
When a listgridfield is set to display an another field with setDisplayField the options in filter editor's select list contain duplicate values. Reproducable with:
Code:
public Record r(Integer i, String t) { Record r = new Record(); r.setAttribute("f1", "Text " + i); if(i != null) r.setAttribute("someid", i); if(t != null) r.setAttribute("title", t); return r; } public void onModuleLoad() { SC.showConsole(); viewport = new VLayout(); viewport.setWidth100(); viewport.setHeight100(); viewport.setMembersMargin(20); DataSource ds = new DataSource(); DataSourceTextField f1f = new DataSourceTextField("f1"); DataSourceIntegerField someidf = new DataSourceIntegerField("someid"); DataSourceTextField tf = new DataSourceTextField("t"); ds.setFields(f1f, someidf, tf); ds.setTestData(r(null, null), r(1, "title1"), r(1, "title1"), r(null, null), r(1, "title1"), r(2, "title2")); ds.setClientOnly(true); final ListGrid g = new ListGrid(); g.setDataSource(ds); g.setWidth(500); g.setHeight(200); g.setAutoFetchData(true); ListGridField f1 = new ListGridField("f1"); ListGridField someid = new ListGridField("someid"); someid.setDisplayField("title"); g.setFields(f1, someid); g.setShowFilterEditor(true); g.setFilterOnKeypress(true); viewport.addMember(g); viewport.draw(); }
Using 4.0p 2013-10-22 nightly.
br,
Marko
Comment