1)jsp层:
<html:select property="maintainUnit" style="width:100%">
<logic:present name="utilslist" scope="request">
<html:options collection="utilslist" property="storeNo"
labelProperty="storeName" />
</logic:present>
</html:select>
2)action层
List utilslist = bpo.getUnits();
((TrustdeedForm)actionForm).setUnitNames(utilslist);
servletRequest.setAttribute("utilslist", utilslist);
3)bpo层
List unitList = new ArrayList();
//开始事务
this.beginTransaction();
List list = tstorehouseDAI.search("from TStorehouse", this.session);
for(int i=0;i<list.size();++i)
{
TStorehouse obj =(TStorehouse)list.get(i);
unitList.add(obj);
}
//结束事务
this.endTransaction(true);
4)of course the TStorehouse obj contain the storeNo and storeName attribute
posted on 2007-04-17 14:03
NG 阅读(123)
评论(0) 编辑 收藏