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 閱讀(126)
評論(0) 編輯 收藏