日期:2014-05-17  浏览次数:20758 次

struts标签<html:selsect>问题
请帮帮忙,我刚接触struts标签,不懂该怎么做?




这是修改页面的代码,我想实现按id跳转过来后下拉列表刚好选中的是该id对应的街道名称,而不是列表框默认选中的值,该怎么实现?

真诚感谢您的帮助!

------解决方案--------------------
不用你设,只要指定为FormBean里面对应的那个属性,会自动给你定位。例如:
<html:select property="seriesObj.moneyType">
<html:optionsCollection name="seriesForm"
property="moneyTypeOptions" />
</html:select>
------解决方案--------------------
探讨
不用你设,只要指定为FormBean里面对应的那个属性,会自动给你定位。例如:
<html:select  property="seriesObj.moneyType">
<html:optionsCollection name="seriesForm"
property="moneyTypeOptions" />
</html:select>

------解决方案--------------------
只要在action里设置form表单设置一个值,然后转向到页面后用<html:select property="xxx">就会自动选择.xxx就是你在from表单设置的值.
------解决方案--------------------
到这里看看或许可以解决你的问题http://user.qzone.qq.com/492236022/blog/1221124323