<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是从配置文件读取的汉子。也可用是否。
本文详细解析了一个MVC框架中基于条件判断和配置文件读取的逻辑实现,包括如何通过radio组件自动选择状态,并从配置文件获取特定值,以及其在实际开发中的应用。
351

被折叠的 条评论
为什么被折叠?



