王垠的「40 行代码」
2014-09-26 09:44
686 查看
webwork action定义
ListGoods 为Map型
public String justFindGoodsItem() throws Exception{
List item1=goodsItemDao.justFindGoodsItem();
itemGoods.put("goodsItem",item1);
return SUCCESS;
}
从hibernate取出数据
public List justFindGoodsItem(){
List goodsitem=hibernateTemplate.find("from Goodsitem");
if(!goodsitem.isEmpty()){
return goodsitem;
}
return null;
}
在页面上先调用此action
然后<ww:select name="department" list="itemGoods"/>
出现错误如下:
org.apache.catalina.core.ApplicationContext log
信息: tag 'select', field 'list', name 'department': The requested list key 'itemGoods' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name}
恳请大家指点
ListGoods 为Map型
public String justFindGoodsItem() throws Exception{
List item1=goodsItemDao.justFindGoodsItem();
itemGoods.put("goodsItem",item1);
return SUCCESS;
}
从hibernate取出数据
public List justFindGoodsItem(){
List goodsitem=hibernateTemplate.find("from Goodsitem");
if(!goodsitem.isEmpty()){
return goodsitem;
}
return null;
}
在页面上先调用此action
然后<ww:select name="department" list="itemGoods"/>
出现错误如下:
org.apache.catalina.core.ApplicationContext log
信息: tag 'select', field 'list', name 'department': The requested list key 'itemGoods' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name}
恳请大家指点
相关文章推荐
- 王垠的「40 行代码」真如他说的那么厉害吗?
- 王垠的「40 行代码」真如他说的那么厉害吗?
- 王垠的「40 行代码」真如他说的那么厉害吗?
- 基于visual c++之windows核心编程代码分析(40)实现屏幕截取
- 地磅称量系统之(40) 实现称量管理界面上的添加、修改、删除、保存、取消按钮的代码
- 让你提前认识软件开发(40):既要写好代码,又要写好文档
- Scala深入浅出实战经典:40,Set、Map、TreeSet、TreeMap操作代码实战
- [改善Java代码]建议40:匿名类的构造函数很特殊
- 60个有用CSS代码片段21-40
- 编写高质量代码改善C#程序的157个建议——建议40:使用event关键字为委托施加保护
- codecombat安息之云山峰37-40及地牢42关代码分享
- //一个计算 “100+40-10+26=”的代码
- Javascript 变量赋值 【每日一段代码40】
- 40 Tips for optimizing your php Code 优化PHP代码的40条建议
- 32位汇编语言学习笔记(40)--在汇编代码中使用libc库函数
- java 算法40题 有实现代码
- 成长手删代码40-listbox js操作上下左右移动.txt
- 插件40:Pound代码
- 基于visual c++之windows核心编程代码分析(40)实现屏幕截取
- 在400×1的列向量中,1至40每个数顺序出现10次MATLAB代码