问答详情
源自:4-2 添加员工

s:select 里面的list报错

tag 'select', field 'list', name 'department.did': The requested list key 'list' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] 报这个错 ,说list不能解析为容器?

提问者:就是要战逗 2016-11-12 11:27

个回答

  • Firmiana_
    2017-03-15 16:24:04

    因为老师漏了一段代码没说,在saveUI方法里面,如下

    List<Department> list = departmentService.findAll();

    ActionContext.getContext().getValueStack().set("list",list);

    记得注入在配置文件里面注入departmentService

  • xxzx
    2017-03-13 17:41:33

    为保存了还是报这个错

  • 就是要战逗
    2016-11-12 11:56:23

    前面忘了存list了