上一篇,主要介绍了Struts2便签中的数据标签和控制标签,这一篇将剩下的标签介绍完:
Strut2 界面标签
Form 标签:表单提交标签; Text 标签:文本标签; Radios 标签:单选标签; Checkboxlist 标签:复选框标签; Select 标签:下拉框标签;
其他标签
Updownselect 标签; Optiontransferselect 标签
Strut2 界面标签
Form 标签:表单提交标签;
Text 标签:文本标签;
Radios 标签:单选标签;
checkboxlist 标签:复选框标签;
Select 标签:下拉框标签;
Form 标签
<body>
<s:form action="hello" method="post" namespace="/foreground">
</s:form>
Text 标签
<body>
用户名:<s:textfield name="userName"></s:textfield><br/>
密码:<s:password name="password"></s:password><br/>
备注:<s:textarea name="desc"></s:textarea><br/>
</body>
Radios 标签
<body>
性别:<s:radio list="#{0: '男 ', 1:'女 '}" name="sex" value="0" />
</body>
checkboxlist标签
<body>
爱好:<s:checkboxlist list="#{0: '游泳', 1:'唱歌 ',2:'跳舞'}" name="hobby" value="1" />
</body>
Select 标签
<body>
爱好:<s:select list="#{0: '游泳', 1:'唱歌 ',2:'跳舞'}" name="hobby" value="1" multiple="true"/>
</body>
其他标签
Updownselect 标签;
Optiontransferselect 标签
Updownselect 标签;
<body>
<s:updownselect
list="#{0:'游泳', 1:'唱歌', 2:'跳舞'}"
name="hobby"
headerKey="-1"
headerValue="请选择"
emptyOption="true"
allowMoveUp="true"
allowMoveDown="true"
allowSelectAll="true"
moveUpLabel="Move Up"
moveDownLabel="Move Down"
selectAllLabel="Select All" />
</body>
Optiontransferselect 标签
<body>
<s:optiontransferselect label="选择你喜欢图书"
name="cnbook" leftTitle="中文图书" list="{'struts2权威指南','轻量级javaeye 企业应用空实战','ajax讲义'}"
doubleName="enBook" rightTitle="外文图书" doubleList="{'JavaScrip:The definitive Guide','export one-to-one'}" multiple="true"
addToLeftLabel="向左移动" addToRightLabel="向右移动" addAllToRightLabel="全部右移" addAllToLeftLabel="全部左移"
allowSelectAll="true" headerKey="cnKey" headerValue="选择图书" emptyOption="true" doubleHeaderKey="enKey"
doubleHeaderValue="选择外文图书" doubleMultiple="true" doubleEmptyOption="true" leftDownLabel="向下移动"
rightDownLabel="向下移动"
leftUpLabel="向上移动"
rightUpLabel="向上移动" >
</s:optiontransferselect>
</body>