使用Struts2的iterator标签轻松遍历复杂的Map类型
来源:互联网 发布:saas mysql数据库设计 编辑:程序博客网 时间:2024/06/05 06:24
1.创建一个Web工程,添加Struts2支持。
2.创建两个实体类:
a). Mother(母亲)的Java类。
package struts.map.entity;
import java.io.Serializable;
public class Mother implements Serializable {
private static finallong serialVersionUID= 1L;
private int motherId; //母亲ID
private String motherName; //母亲名字
publicint getMotherId() {
return motherId;
}
public void setMotherId(int motherId) {
this.motherId= motherId;
}
public String getMotherName() {
return motherName;
}
public void setMotherName(String motherName) {
this.motherName= motherName;
}
}
2.创建两个实体类:
a). Mother(母亲)的Java类。
package struts.map.entity;
import java.io.Serializable;
public class Mother implements Serializable {
private static finallong serialVersionUID= 1L;
private int motherId; //母亲ID
private String motherName; //母亲名字
publicint 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标签遍历Map
- struts2的s:iterator 标签遍历 详解
- struts2的iterator标签遍历HashMap
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- Struts2中iterator标签遍历map总结
- A+B(H1228)
- 后台得到div的id值 改变div的样式
- [Oracle]语法备忘]
- DirectUI Lib XML编写说明
- 在ios中的Document中创建多级文件夹以及文件
- 使用Struts2的iterator标签轻松遍历复杂的Map类型
- 常见的等待事件:
- asp.net 之StringBuilder 去除重复数据
- Drawable资源资源使用
- The processing instruction target matching "[xX][mM][lL]" is not allowed
- ActiveMQ实战之 Topic发布订阅消息
- 添加asihttprequest框架到iPhone/iPad工程中使用
- 堆和栈的区别
- hql select from