问题描述
- Error marshalling java.util.Date: For input string: "2013-09-10%2013%3A09"
-
时间文本框:通过dwr获取res,向表单传值:
res[0] = [{devNo:res[0].devNo,sleepTime:res[0].sleepTime,syncTime:formatDate(res[0].syncTime,'yyyy-mm-dd HH:nn'),safeTime:formatDate(res[0].safeTime,'HH:nn'),warmCount:res[0].warmCount,limitDl:res[0].limitDl}];获取数据的方法:
public List queryDevInitParam(String dn, boolean bool) {
isQueryDev=false;
User user = UserUtil.getCurrentUser();
if (user == null || user.getPowerSupply() == null || dn == null)
return Collections.EMPTY_LIST;
// this.packQueryDev(dn);StringBuffer sb = new StringBuffer( "select d.id as id, d.dev_no as devNo,d.sleep_time as sleepTime," + "d.sync_time as syncTime,d.safe_time as safeTime,d.warm_count as warmCount,d.limit_dl as limitDl" + " from t_dev_param d where d.dev_no=:dn"); Map params = new HashMap(); params.put("dn", dn); Map sc = new HashMap(); sc.put("id", Hibernate.STRING); sc.put("devNo", Hibernate.STRING); sc.put("sleepTime", Hibernate.INTEGER); sc.put("syncTime", Hibernate.TIMESTAMP); sc.put("safeTime", Hibernate.TIMESTAMP); sc.put("warmCount", Hibernate.INTEGER); sc.put("limitDl", Hibernate.INTEGER); HibernateCallback action = HibernateCallbackUtil.getNativeCallback( sb, params, false, sc, Transformers.ALIAS_TO_ENTITY_MAP); List res = (List) hibernateTemplate.execute(action); return res; }
问什么回报错呢?????
时间: 2024-10-30 10:14:14