複製程式碼
複製程式碼
複製碼
程式碼如下:
package com.leo.action;
import java.util.ArrayList;
import java.util.List; >import com.leo.bean.Person;
import com.opensymphony.xwork2.ActionSupport;
public class ExtjsAction extends ActionSupport {
private long results;Actions; >
public long getResults() {
return results;
}
public void setResults(long results) {
this.results = results;
public List getItems() {
return items;
}
public void setItems(List items) {
this.items = items;
}
}
public String execute() throws Exception {
this.results = 3;
Person p1 = new Person("張三", 29, "男", "1990-10-22");
Person p2 = new Person("李四", 28, "男", "1991-03-30");
Person p3 = new Person("王五", 27, "女", "1993- 08-17");
this.items = new ArrayList
();
this. items.add(p3);
複製程式碼
程式碼如下:
BR>"http://struts.apache.org/dtds/struts-2.1.dtd">