1 <%@ page contentType="text/html; charset=GBK" language="java"%>
2 <%@taglib prefix="s" uri="/struts-tags"%>
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
6 <title>使用s:optiontransferselect来生成可移动列表项的下拉列表框</title>
7 <s:head/>
8 </head>
9 <body>
10 <h3>使用s:optiontransferselect来生成可移动列表项的下拉列表框</h3>
11 <s:form>
12 <!-- 使用简单集合对象来生成可移动的下拉列表框 -->
13 <s:optiontransferselect
14 label="请选择你喜欢的图书"
15 name="cnbook"
16 leftTitle="中文图书:"
17 rightTitle="外文图书"
18 list="{'疯狂Java讲义' ,'Struts2权威指南',
19 '轻量级J2EE企业应用实战','基于J2EE的Ajax宝典'}"
20 multiple="true"
21 addToLeftLabel="向左移动"
22 selectAllLabel="全部选择"
23 addAllToRightLabel="全部右移"
24 headerKey="cnKey"
25 headerValue="--- 选择中文图书 ---"
26 emptyOption="true"
27 doubleList="{'Expert One-on-One J2EE Design and Development',
28 'JavaScript: The Definitive Guide'}"
29 doubleName="enBook"
30 doubleHeaderKey="enKey"
31 doubleHeaderValue="--- 选择外文图书 ---"
32 doubleEmptyOption="true"
33 doubleMultiple="true"
34 />
35 </s:form>
36 </body>
37 </html>