首页 > 编程语言 > 详细

el表达式取复杂map数组的值

时间:2015-03-23 18:01:25      阅读:272      评论:0      收藏:0      [点我收藏+]
1.对于Map<Integer,Object> 结构类似于map中嵌套map类型
Map<Integer,Object> map1=new HashMap<...>()
Map<Integer,String> map2=new HashMap<...>()
Map<Integer,String> map3=new HashMap<...>()
map2.put(1,"a");
map2.put(2,"b");
map1.put(3,map2);
map1.put(4,map3);
如果想取得map2中的值"a",可以这样写${map1[3][1]}其中 []中是map的键,它一定要与当时声明的map的键类型一致,Integer类型的不能写成String类型的,同样string类型的也不能写成Integer类型的,否则页面取不到值

el表达式取复杂map数组的值

原文:http://blog.csdn.net/colorsunlight/article/details/44565763

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!