struts2的select标签使用问题?
leiht 2009-04-07 02:04:16 我在<S:form></s:form>里有一个<s:select>标签,定义如下
<s:select id="roottype" name="roottype" list="#{'movie':'电影','teleplay':'电视剧','variety-show':'综艺节目'}" headerKey="-1" headerValue="-- 请选择 --"></s:select>另外有一个查询按钮,查询的功能是返回视频信息列表,并显示出来
显示代码如下:
<td><s:property value="director" /></td>
<td><s:property value="episode" /></td>
<td><s:property value="roottype" /></td>
用的是<S:iterator>标签进行迭代。
结果显示的结果中roottype出现问题,总是-1,即上面定义的<s:select>中的headerkey,不是从数据库中查询出的字段值,其他字段都没有问题,只有这个<s:select>有问题。
我把<s:select>中的id去掉后,能正常显示,请问这是为什么?(我想改名后也能正常显示)
谁能告诉我理由,我就谢谢她了。