When I use Beans to fill the items, it will work, but when I put maps
in items, it will get this problem, just like this,
public class Projectstruts extends ActionSupport{
public String execute() throws Exception{
HttpServletRequest request=ServletActionContext.getRequest();
String id="struts";
String [] dates = {"10/31/01",
"01/01/01", "03/05/01", "02/04/01"};
String [] it = {"Halloween", "New Years", "Birthday",
"Anniversary"};
Map itemsmap=new HashMap();
List itemslist=new ArrayList();
itemslist.add(itemsmap);
for(int i=0;i<it.length;i++){
itemsmap.put(it[i], dates[i]);
}
String [] dates2 = {"10/31/01", "01/01/01", "03/02/05","03/05/01"};
String [] dates3 = {"10/22/05", "02/03/03", "03/05/01", "02/04/01"};
Map itemsmap2=new HashMap();
for(int i=0;i<dates2.length;i++){
itemsmap2.put(it[i], dates2[i]);
}
Map itemsmap3=new HashMap();
for(int i=0;i<it.length;i++){
itemsmap3.put(it[i], dates3[i]);
}
itemslist.add(itemsmap2);
itemslist.add(itemsmap3);
Collection<List> items=itemslist;
TableFacade tableFacade = createTableFacade(id, request);
tableFacade.setEditable(false); // switch to flip that turns
the table editable
tableFacade.setItems(items); // set the items
tableFacade.setStateAttr("restore"); // return to the table in
the same state that the user left it
String html = getHtml(tableFacade,request);
request.setAttribute("Project", html);
return SUCCESS;
}
I've got the printscreen and upload it, is it a specific use case?
On 4月22日, 下午8时18分, "Jeff Johnston" <
extremecompone...@gmail.com>
wrote:
> > the result.- 隐藏被引用文字 -
>
> - 显示引用的文字 -