使用strust标签库中的s:iterator和s:property获取不到对象的属性值

overself 发布于 2016/05/06 11:14
阅读 412
收藏 0

求大神们指导下

这是jsp中的代码

<s:iterator var="say" value="#session.says">

        <li><s:property value="#say.hrEmployeeById.uid"/>
        <span><s:property value="#say.sDate"/></span>
        </li>

        <li><s:property value="#say.sContent"/></li>

   </s:iterator>


这是实体类

package com.crm.info;


import java.io.Serializable;


public class CrmEmployeeSay implements Serializable {
//主键
private Long sid;
private HrEmployee hrEmployeeById;
//内容
private String sContent;
//时间
private String sDate;
public CrmEmployeeSay(){

}
public CrmEmployeeSay(Long sid, HrEmployee hrEmployeeById, String sContent,
String sDate) {
super();
this.sid = sid;
this.hrEmployeeById = hrEmployeeById;
this.sContent = sContent;
this.sDate = sDate;
}
public Long getSid() {
return sid;
}
public void setSid(Long sid) {
this.sid = sid;
}
public HrEmployee getHrEmployeeById() {
return hrEmployeeById;
}
public void setHrEmployeeById(HrEmployee hrEmployeeById) {
this.hrEmployeeById = hrEmployeeById;
}
public String getsContent() {
return sContent;
}
public void setsContent(String sContent) {
this.sContent = sContent;
}
public String getsDate() {
return sDate;
}
public void setsDate(String sDate) {
this.sDate = sDate;
}

}


加载中
返回顶部
顶部