ublic class userForm extends ActionForm {

    private String jkjc;
  
    private String gmjjhylb;
  
    private String qygsdjzclx;
   有相应的的get和set方法
    }
   userForm  userForm = new UserForm
   userForm  userForm = new UserForm
   list.add(userForm );
   list.add(userForm)
   request.setAttribute("lgList", lgList);
页面:
     <logic:iterate id="element" name="lgList">
     
    <table cellspacing=0 border=0 class="table-99" style="TABLE-LAYOUT:fixed">
          <tr>
            <td width="18%" class="2-td2-t-left"><div align="right">国民经济行业类别</div></td>
            <td width="32%" class="2-td2-t-left"><div align="left">
              <html:select property="gmjjhylb" name="element" >
              <html:option value="01">01造林</html:option>
              <html:option value="02">02药材</html:option>
              </html:select>                             
            <span class="bitian">*</span></div></td>
            <td width="18%" class="2-td2-t-left"><div align="right">企业工商登记注册类型</div></td>
            <td width="32%" class="2-td2-t-center"><div align="left">
               
                <html:select property="qygsdjzclx" name="element"   >
         
                <html:option value="01">01私营</html:option>
                <html:option value="02">02国营</html:option>
                </html:select>     
                 
            <span class="bitian">*</span></div></td>
          </tr>
          <tr>
           
            <span class="bitian">*</span></div></td>
 <td class="2-td2-left"><div align="right">监控级次</div></td>
            <td class="2-td2-center"><div align="left">
              <html:select property="jkjc" name="element" > 
               <html:option value="01">01市级</html:option>
               <html:option value="02">02区级</html:option>
               <html:option value="03">03所级</html:option>
               <html:option value="04">04随级</html:option>
              </html:select>     
            <span class="bitian">*</span></div></td>
          </tr>          
        </table>
        <br>
        </logic:iterate>
              </html:select> 
不能显示所查询的值

解决方案 »

  1.   

    楼主你的代码有些不是太清楚啊,逻辑有点让我搞不懂啊你是想把List 中每个userForm属性分别填充到不同的Select 中吗?我是不太喜欢使用 structs 标签的,因为 structs标签只能用于使用structs的项目中的,如果不用 structs 那你就用不成 structs 标签了,而 structs 标签唯一值得使用的地方我觉得就是它的回选功能,在查询过后数据可以自动回绑,而你使用JSTL 标签也不用花太多的精力就可以做到,建议你使用 JSTL 标签.你能把你想做的逻辑说的清楚点么?