struts2标签iterator

阅读更多


         
         
    
     
     
     
      删除
      修改
     
    
   

   
   
    
    
     
      
       
        

相应的action的方法

  //ServletActionContext.getRequest().setAttribute("departmentList", departmentList);
//  List> lists = new ArrayList>();
//  Department department1 = new  Department();
//  department1.setDname("department1_name");
//  Department department2 = new  Department();
//  department2.setDname("department2_name");
//  List departmentList1 = new ArrayList();
//  departmentList1.add(department1);
//  List departmentList2 = new ArrayList();
//  departmentList2.add(department2);
//  lists.add(departmentList1);
//  lists.add(departmentList2);
//  
//  List> lists2 = new ArrayList>();
//  Map map1 = new HashMap();
//  map1.put("d1", department1);
//  Map map2 = new HashMap();
//  map2.put("d2", department2);
//  lists2.add(map1);
//  lists2.add(map2);
//  
//  Map> maps = new HashMap>();
//  maps.put("list1", departmentList1);
//  maps.put("list2", departmentList2);
//  ActionContext.getContext().put("maps", maps);

你可能感兴趣的:(struts2,s,iterator)