JSP中的代码:
<logic:iterate id="item" name="testSortForm" property="list" type="tci.core.froggy.admin.action.TestSortForm" indexId="index">
<td><html:text name="item" property="list.kindAbbr" indexed="true" size="20" maxlength="40"/></td>
<td><html:text name="item" property="list.testKind" indexed="true" size="20" maxlength="40"/></td>
</logic:iterate>
ACTION中:
ArrayList list = new java.util.ArrayList();
while(rs.next())
{
TestSortForm obj = new TestSortForm();
obj.setKindAbbr(rs.getString(1));
obj.setTestKind(rs.getString(2));
list.add(obj);
}
request.setAttribute("list",list);
我在ActionForm中也定义了:
private List list = new ArrayList(); public List getList(){
return list;
}
public void setList(List list){
this.list = list;
}
为什么页面上就是不显示DB里的数据呢?
哪位高手快来帮帮忙啊~~
头疼啊
<logic:iterate id="item" name="testSortForm" property="list" type="tci.core.froggy.admin.action.TestSortForm" indexId="index">
<td><html:text name="item" property="list.kindAbbr" indexed="true" size="20" maxlength="40"/></td>
<td><html:text name="item" property="list.testKind" indexed="true" size="20" maxlength="40"/></td>
</logic:iterate>
ACTION中:
ArrayList list = new java.util.ArrayList();
while(rs.next())
{
TestSortForm obj = new TestSortForm();
obj.setKindAbbr(rs.getString(1));
obj.setTestKind(rs.getString(2));
list.add(obj);
}
request.setAttribute("list",list);
我在ActionForm中也定义了:
private List list = new ArrayList(); public List getList(){
return list;
}
public void setList(List list){
this.list = list;
}
为什么页面上就是不显示DB里的数据呢?
哪位高手快来帮帮忙啊~~
头疼啊
<tr>
<td>
<html:text name="element" property="m_ccpfyzcqccb_scdh" /></td>
</tr>
我Struts刚刚入门,不是很明白啊
<td><html:text name="item" property="kindAbbr" indexed="true" size="20" maxlength="40"/></td>
<td><html:text name="item" property="testKind" indexed="true" size="20" maxlength="40"/></td>
<logic:iterate id="item" name="testSortForm" property="list" >
改成:
<logic:iterate id="item" name="list">
你这里是不对的
<logic:iterate id="item" name="list" indexId="index">