struts2使用s:iterator标签解析List>,其中Object有List类型

阅读更多
struts2中action数据封装格式


List> list = new ArrayList> ();
List> sublist= new ArrayList> ();

Map submap =new HashMap();
    submap.put("system_name", "system1");
    submap.put("summi", "50分钟");


Map submap1 =new HashMap();
    submap1.put("system_name", "system2");
    submap1.put("summi", "80分钟");
  

sublist.add(submap);
sublist.add(submap1);

Map map =new HashMap();
    map.put("day", "2011-09-01");
    map.put("normal", "err");
    map.put("arrList", sublist);

Map map1 =new HashMap();
    map1.put("day", "2011-09-02");
    map1.put("normal", "ok");
    map1.put("arrList", sublist);

list.add(map);
list.add(map1);


接收jsp标签输出:





   
       list中Map的Key值
       list中Map的sublist值
        
           sublist中Map的Key值
   

  
${i.index} ${day} ${system_name}  ${summi} 





----------------------------------------------------

输出数组:
定义: String[] propertyNames=new String[100]


输出List:
初始select选中项,并且迭代fee=List


输出List:

初始select选中项,并且迭代compayFundCodeList=List

你可能感兴趣的:(struts2,s:iterator标签,map,list)