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不能解析為容器?
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不能解析為容器?
舉報
2017-03-15
因為老師漏了一段代碼沒說,在saveUI方法里面,如下
List<Department> list = departmentService.findAll();
ActionContext.getContext().getValueStack().set("list",list);
記得注入在配置文件里面注入departmentService
2017-03-13
為保存了還是報這個錯
2016-11-12
前面忘了存list了