struts2中<s:select/>标签的运用详解

<s:select list="smsTypes" listKey="SmsTypeId" listValue="SmsTypeName" name="template.smsTypeId" headerKey="" headerValue="--请选择--"  theme="simple">

注意:smsTypes为后台传来的list列表值,listKey为list中实体类作为与传来值对应的属性,listValue为list中实体类要显示的属性,name用于前后台传值和接受值

headerKeyheaderValue为默认值,theme="simple"为了不让其自动换行

<s:select list="#{0:'未审核',1:'审核中',2:'审核未通过',3:'审核已通过' }" listKey="key" listValue="value" name="template.smsStatus"/>

注意:此list为自定义,所以listKeylistValue为默认固定值key、value(不可改变),name用于前后台传值和接受值

posted on 2013-10-16 18:34  世界之大追梦者  阅读(305)  评论(0编辑  收藏  举报

导航