好像是optionsCollection可以用来写下拉框的东西。
比如:
<html:select size="1" property="deptid">
<html:optionsCollection value="oid" name="employeeForm"
property="departments" label="deptName" />
</html:select>

解决方案 »

  1.   

    就是说options可以指定两个List<String>分别读取option的值和显示文字,
    当然这两个集合可以是同一个ListoptionsCollection指定一个集合List<Object>,option的值和文字对应每个object的两个属性
      

  2.   

    html:optionsCollection标签html:optionsCollection标签生成多个HTML的option元素。<html:select name="selectForm" property="person.id" size="1">
      <html:optionsCollection name="selectForm" property="persons" label="name" value="id"/> 
    </html:select>
    html:optionsCollection标签就是一个可以很容易就实现动态下拉列表实现的一个标签--------------------------------------------------------------------------------
    html:options标签html:options标签生成多个HTML的option元素。<bean:define id="personCollection" name="selectForm"  property="persons"/>
    <html:select name="selectForm" property="person.id" size="1">
      <html:options collection="personCollection" property="id" labelProperty="name"/> 
    </html:select><html:select name="selectForm" property="person.id" size="1">
      <html:options property="ids" labelProperty="names"/> 
    </html:select>html:options标签的作用和html:optionsCollection标签的作用基本一样,只是用法上稍有出入