ITeye博客

s:select 用法

sundful · 2010-02-07 21:42 · Struts2 · Web前端 · Markdown

1、在页面对应的Action中有typeBase属性,改变下拉选单的值,然后提交,typeBase的值会传到后台:

 

<s:select name="typeBase" value="%{typeBase}" list="#{'CN':'中文','EN':'英文','FR':'外文'}" />

这里的list是固定的,如语言别,性别等等;

 

2、在页面对应的Action中有inputCountryId属性,同时有countryList属性,类型为List,改变下拉选单的值,然后 提交,inputCountryId的值会传到后台:

<s:select id="inputCountryId" name="inputCountryId"
	list="countryList" listKey="key" listValue="value" headerKey=""
	headerValue="" cssStyle="font-size: 12px; width: 167px;" />

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。