平时struts1中常使用①
<html:select property="typeIDS">
<html:options collection="Types" property="value" labelProperty="label" />
</html:select>
也有时使用②
<html:select property="benefitMarkS">
<html:option value=""></html:option>
<html:option value="1">是</html:option>
<html:option value="2">否</html:option>
</html:select>
方式
而有时候使用③
<html:select property="benefitMarkS">
<option value=""></option>
<option value="1">是</option>
<option value="2">否</option>
</html:select>
当我们做一个页面中包含:1上半部是查询条件部分,2下半部分是一个列表用来显示查询结果
用户选择查询条件后点击查询,跳转到服务器查询数据并返回该页面显示数据
当查询部分分别加入①②③三种形式的select控件时
且act
当跳转回页面显示数据时,①②两种情况可以将跳转到服务器查询之前的查询条件带回页面并自动选择该值
当使用③的形式时,值也将被带回页面,但struts无法自动选择该值