Hi, my project needs to support IE11, so recently I upgraded the project to smartgwt version 5.0p, but one SelectItem in grid which worked correctly before upgrade goes wrong after upgrade, the SelectItem is stuck to the last option of the SelecItem, no matter which option you select, below is the method used to construct the SelectItem:
I have checked that the values of HTML elements
and
were retrieved correctly and the JSON data returned in HTTP response was correct.
I tried to contructed the SelectItem fed with a HashMap containing the option id/value pairs and it worked fine, any ideas?
Code:
protect SelectItem getCS(final String sortIndicator) {
final DataSource dataSource = new DataSource();
DataSourceField criteriaValue = new DataSourceField("value","value");
dataSource.setFields(criteriaValue);
dataSource.setDataFormat(DSDataFormat.JSON);
dataSource.setDataURL("/c/r.do");
dataSource.setCriteriaPolicy(CriteriaPolicy.DROPONCHANGE);
final SelectItem criteriaSelectItem = new SelectItem();
criteriaSelectItem.setPickListFilterFunction(
new FilterCriteriaFunction() {
public Criteria getCriteria() {
String category = DOM.getElementProperty(DOM.getElementById("category"), "value");
String reporttype = DOM.getElementProperty(DOM.getElementById("reporttype"), "value");
Criteria pickListCriteria = new Criteria();
pickListCriteria.addCriteria("sortIndicator", sortIndicator);
pickListCriteria.addCriteria("category", category);
pickListCriteria.addCriteria("reporttype", reporttype);
return pickListCriteria;
}
}
);
criteriaSelectItem.setWidth(200);
criteriaSelectItem.setPickListWidth(200);
criteriaSelectItem.setPickListHeight(100);
criteriaSelectItem.setOptionDataSource(dataSource);
criteriaSelectItem.setDisplayField("value");
return criteriaSelectItem;
}Code:
categoryCode:
reporttypeI tried to contructed the SelectItem fed with a HashMap containing the option id/value pairs and it worked fine, any ideas?