我给一个dwrStore添加了两个参数,一个是类型,一个是年份。
然后从controller层查询到数据后返回给store,再用comboBox显示。
结果在类型为月份的时候,能正确显示12个月。而参数是季度的时候,就只显示第四季度。
我已经检查过controller层的代码。返回的的确是4个季度的数据。谁能帮我看看为什么类型为季度的时候,就只显示最后一条数据啊?具体代码如下:controller层:  /**
* 用于获取开启的报表月份.
*  
* @param filterBy
* 筛选条件
* @param year
* 选择的年份
* @param type
* 报表类型
* @param request
* @return
*/
public List getOpeningReports(String type, String year,
HttpServletRequest request) {String hql = "select new map(reportDate as id, re as text) from "
+ NtmrsReportList.class.getName() + " where type = " + type
+ " and reportDate like('" + year
+ "%') and reportStatus = 'Y' order by id";List results = getUniversalManager().findList(hql);
return results;
}=======================================================================================
jsp页面代码片段如下:var reportDateStore = new Ext.ux.data.DwrStore({
fields: ['id', 'text'],
dwrCall : NtmrsReportListController.getOpeningReports,
autoload: false
}); reportDateStore.load({
params:{
arg:[type,year]
}
});
var reportDateCombo = new Ext.form.ComboBox({
store: reportDateStore,
valueField:'id',
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'请选择日期...',
selectOnFocus:true,
editable:false,
width:100
});