ext3.3完整包
ext3.3中文文档
数据表的结构是:数据表table > 记录record > 字段
store的结构是: ext.data.store > ext.data.record>ext.datadatafield
store 首先驱动 dataproxy 加载数据 ,dataproxy加载完成会驱动 datareader时行解析,最终获得record对象。
1.bean :
复制代码 代码如下:
package com.leo.bean;
public class person {
private string name;
private int age;
private string sex;
private string birthday;
public person(string name, int age, string sex, string birthday) {
super();
this.name = name;
this.age = age;
this.sex = sex;
this.birthday = birthday;
}
public string getname() {
return name;
}
public void setname(string name) {
this.name = name;
}
public int getage() {
return age;
}
public void setage(int age) {
this.age = age;
}
public string getsex() {
return sex;
}
public void setsex(string sex) {
this.sex = sex;
}
public string getbirthday() {
return birthday;
}
public void setbirthday(string birthday) {
this.birthday = birthday;
}
}
2.action
复制代码 代码如下:
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;
private list items;
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(p1);
this.items.add(p2);
this.items.add(p3);
return success;
}
}
3.struts-xml
复制代码 代码如下:
br>http://struts.apache.org/dtds/struts-2.1.dtd>
4.xml
复制代码 代码如下:
struts2
org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter
struts2
*.action
5.jsp
复制代码 代码如下:
extjs与struts2结合
图示: