我遇到过Struts 2.x的答案,但没有struts 1.x的答案.
我需要做的就是使用1.x的HTML:SELECT标签选择页面加载的默认值,该标签使用optioncollector:
<html:select property="status">
<html:optionsCollection name="statusList" label="description" value="id" />
</html:select>
Run Code Online (Sandbox Code Playgroud)
看起来很简单,但我想避免使用javascript.
小智 11
您是否尝试在标记上使用该value属性<html:select>?
<html:select property="status" value="...your status choise here...">
<html:optionsCollection name="statusList" label="description" value="id" />
</html:select>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12292 次 |
| 最近记录: |