Hi,
SmartGWT 6.0p - SmartClient Version: v11.0p_2017-02-27/LGPL Development Only (built 2017-02-27)
GWT 2.8.0
With a ListGrid with filtering enabled, filter operators allowed and operator icon always shown, fields configured as "setAllowFilterOperators" break the draw of the grid with error
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot set property 'prompt' of undefined
at Unknown.isc_ListGrid_updateOperatorIcon
at Unknown.isc_ListGrid_setFieldSearchOperator
at Unknown.isc_RecordEditor_draw
at Unknown.isc_Layout_layoutChildren
...
Reproducible with the following test case:
SmartGWT 6.0p - SmartClient Version: v11.0p_2017-02-27/LGPL Development Only (built 2017-02-27)
GWT 2.8.0
With a ListGrid with filtering enabled, filter operators allowed and operator icon always shown, fields configured as "setAllowFilterOperators" break the draw of the grid with error
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot set property 'prompt' of undefined
at Unknown.isc_ListGrid_updateOperatorIcon
at Unknown.isc_ListGrid_setFieldSearchOperator
at Unknown.isc_RecordEditor_draw
at Unknown.isc_Layout_layoutChildren
...
Reproducible with the following test case:
Code:
/*
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot set property 'prompt' of undefined
at Unknown.isc_ListGrid_updateOperatorIcon
at Unknown.isc_ListGrid_setFieldSearchOperator
at Unknown.isc_RecordEditor_draw
at Unknown.isc_Layout_layoutChildren
...
*/
public class OpGrid extends ListGrid {
public OpGrid() {
super();
// setup filtering with operators
setShowFilterEditor(true);
setFilterOnKeypress(true);
setAllowFilterOperators(true);
setAllowFilterExpressions(true);
// ... with operator icon always shown
setAlwaysShowOperatorIcon(true);
ListGridField gf1 = new ListGridField("f1");
// this breaks things - comment this out and the grid works
gf1.setAllowFilterOperators(false);
ListGridField gf2 = new ListGridField("f2");
setFields(gf1, gf2);
}
}
public void doOnModuleLoad() {
SC.showConsole();
viewport = new VLayout();
viewport.setWidth100();
viewport.setHeight100();
viewport.setOverflow(Overflow.HIDDEN);
DataSource ds = new DataSource();
ds.setID("myDS");
DataSourceIntegerField f1 = new DataSourceIntegerField("f1");
f1.setPrimaryKey(true);
DataSourceTextField f2 = new DataSourceTextField("f2");
ds.setFields(f1, f2);
OpGrid g = new OpGrid();
g.setDataSource(ds);
viewport.addMember(g);
viewport.draw();
}
Comment