当前位置: 代码迷 >> Web前端 >> radio 取值 跟默认值
  详细解决方案

radio 取值 跟默认值

热度:426   发布时间:2012-09-08 10:48:07.0
radio 取值 和默认值
<c:choose>
	<c:when test="${report.isStaReport==true}">
		<fmt:message key="reportCheckList.shishicount"/>:
		<s:set name="ok" value="%{getText('common.true')}"/> 
	                <s:set name="no" value="%{getText('common.false')}"/> 
	                <s:radio name="report.isStaReport" list="#{'true':#ok,'false':#no}" theme="simple"/> 
	</c:when>
</c:choose>

?

radio 的name和action属性对应。。会自动取值然后在list 里面判断。他的值是什么就会默认选择哪种了。

<s:set name="ok" value="%{getText('common.true')}"/>
这句的value是从配置文件读取的汉子。也可用是否。

  相关解决方案