当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 如下 <logic:present name="cargoexport"> <logic:iterate id="cargo" name="cargoexport" type="ywsoftware.ship.businesstable.tctcargo"> <l......
 ·    »显示摘要«
    摘要: 各个分论坛应该都有比较好的帖子,或回复比较多的,比较热门的,请问如何查 到它们呢? ......


<html:select /> <html:options> 问题

request内已有集合对象   depts,内含多个dept对象,  
  dept对象有   id,name  
   
  编辑user对象属性.  
  user内含有deptSet属性,有   user.dept.id;  
   
   
  希望实现  
   
  显示HTML   <select>   下拉框,名字deptid,有多个dept选择,默认已选择了   user.dept.id的项目。  
   
  Struts   标签怎么实现?  
   
  我用  
  <html:select   name="deptid"   >  
  <html:options   collection="depts"   property="id"   labelProperty="name"   />  
   
   
  只能实现下拉所有单位列表,但没有选择默认值,  
  怎么办?

NO.1   作者: zeq258

request内已有集合对象   depts,内含多个dept对象,  
  dept对象有   id,name  
   
  ------------  
  首先你的这个depts应该是一个容器类的对象,  
  如果要直接取这个对象里边的一个元素的某个属性的话,  
   
  用struts标签可能实现不了。  
  直接用代码写吧!


    摘要: 谢谢 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE