部門存值為空 直接使用department.id會報錯
The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator ty ? 類似這個錯誤 ? 但list值能取到 ? 就是存到數(shù)據(jù)庫為空
The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator ty ? 類似這個錯誤 ? 但list值能取到 ? 就是存到數(shù)據(jù)庫為空
舉報
2018-07-08
還是得靠自己,laozi告訴你們正解。
Employee中的Department成員變量,在使用ModelDriven之前,必須要Department department = new Department();因為沒有實例化,所以無法對department.did賦值。
解決方法:
在Employee中添加構(gòu)造方法
public Employee(
????department = new Department();
)
就是在用之前實例化,就可以了。老師挖的坑。。
2017-03-13
我也遇到了
2016-12-03
懶加載加載全部,
2016-11-01
改為department.did也不行誒
2016-10-13
<s:select>name屬性改為department.did
2016-10-06
我知道了 只要把<s:select>name屬性改為dno就好了
2016-10-06
我也是吶【求解答】
2016-10-03
需要詳細信息