使用Struts2的iterator标签轻松遍历复杂的Map类型
2012-04-24 17:30
483 查看
1.创建一个Web工程,添加Struts2支持。
2.创建两个实体类:
a). Mother(母亲)的Java类。
package struts.map.entity;
import java.io.Serializable;
public
class Mother
implements Serializable {
private
static final
long serialVersionUID
= 1L;
private
int motherId;
//母亲ID
private String motherName;
//母亲名字
public
int getMotherId() {
return motherId;
}
public
void setMotherId(int motherId) {
this.motherId
= motherId;
}
public String getMotherName() {
return motherName;
}
public
void setMotherName(String motherName) {
this.motherName
= motherName;
}
}
b).Children(孩子)的Java类
原文:http://www.blogjava.net/zyw090111/archive/2010/08/26/330017.html
2.创建两个实体类:
a). Mother(母亲)的Java类。
package struts.map.entity;
import java.io.Serializable;
public
class Mother
implements Serializable {
private
static final
long serialVersionUID
= 1L;
private
int motherId;
//母亲ID
private String motherName;
//母亲名字
public
int getMotherId() {
return motherId;
}
public
void setMotherId(int motherId) {
this.motherId
= motherId;
}
public String getMotherName() {
return motherName;
}
public
void setMotherName(String motherName) {
this.motherName
= motherName;
}
}
b).Children(孩子)的Java类
原文:http://www.blogjava.net/zyw090111/archive/2010/08/26/330017.html
相关文章推荐
- 使用Struts2的iterator标签轻松遍历复杂的Map类型
- 使用Struts2的iterator标签遍历复杂的Map类型
- 使用Struts2的iterator标签遍历复杂的Map类型
- 使用Struts2的iterator标签遍历复杂Map种类
- struts2的iterator标签遍历list数组时候,对date标签的使用
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- struts2 action 前端 iterator 标签遍历 map, list, array 数组
- Struts2的iterator标签遍历Map
- Struts2标签<s:iterator>中使用Map
- Struts2 iterator 标签遍历 Map,List,数组
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- struts2使用iterator标签显示嵌套Map - 云自无心水自闲 - BlogJava
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结(转)
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结