这样没什么错啊。
不过type="hotel.data.action.DataActionForm" scope="request"不写也应该没问题

解决方案 »

  1.   

    是没错,可是我现在想得到property="itemtitle"的值,我应该怎么写呀
      

  2.   

    我的做法是将“item_id”,"itemtitle"这个表中的数据取到数组中,
    页面上显示的将为一个不可改的下拉框。显示值为表中与item_id对应的itemtitleimport java.util.ArrayList;
    import java.util.List;ArrayList arryList= new ArrayList();
    arryList.add(new LabelValueBean("系统管理员","0"));
    arryList.add(new LabelValueBean("班长","1"));
    arryList.add(new LabelValueBean("操作员","2"));
    List myList=arryList;
    request.setAttribute("myList",myList);页面上:
     <logic:iterate id="data" name="dataView" type="hotel.data.action.DataActionForm" scope="request">
      <tr>
        <td align="center"><bean:write name="data" property="data_id"/></td>
        <td align="center">
        <html:select name="data" property="item_id" disabled="true">
    <html:options collection="myList" property="value" labelProperty="label" />
        </html:select>
        </td>
        <td align="center"><html:text name="data" property="data"/></td>
       </tr>
    </logic:iterate>
      

  3.   

    import org.apache.struts.util.LabelValueBean;
    还有要引入这个
      

  4.   

    我不想要带下拉列表的,我可想在那里有<html:text>显示itemtitle,那怎么办呀