<%@ page contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<%@ taglib prefix=
"s"
uri=
"/struts-tags"
%>
<%@ taglib prefix=
"s"
uri=
"/struts-tags"
%>
<%@ taglib prefix=
"sx"
uri=
"/struts-dojo-tags"
%>
<html>
<head>
<title>UI Tags Example</title>
<s:head />
<sx:head parseContent=
"true"
/>
</head>
<body>
<s:actionerror/>
<s:actionmessage/>
<s:fielderror />
<s:form action=
"exampleSubmit"
method=
"post"
enctype=
"multipart/form-data"
tooltipConfig=
"#{'jsTooltipEnabled':'true'}"
>
<s:textfield
label=
"Name"
name=
"name"
tooltip=
"Enter your Name here"
/>
<s:date name=
"Select Your Birthday"
/>
<!-- 在struts2.
2.1
中<sx:datetimepicker/>的标签使用有所变化,需要引入struts2-dojo-plugin-
2.2
.
1
.jar
这个包。
-->
<sx:datetimepicker
tooltip=
"Select Your Birthday"
label=
"Birthday"
name=
"birthday"
/>
<s:textarea
tooltip=
"Enter your Biography"
label=
"Biograph"
name=
"bio"
cols=
"20"
rows=
"3"
/>
<s:select
tooltip=
"Choose Your Favourite Color"
label=
"Favorite Color"
list=
"{'Red', 'Blue', 'Green'}"
name=
"favoriteColor"
emptyOption=
"true"
headerKey=
"None"
headerValue=
"None"
/>
<s:select
tooltip=
"Choose Your Favourite Language"
label=
"Favourite Language"
list=
"#{'CN':'中文','EN':'英文','FR':'外文'}"
name=
"favouriteLanguage"
emptyOption=
"true"
headerKey=
"None"
headerValue=
"None"
/>
<s:checkboxlist
tooltip=
"Choose your Friends"
label=
"Friends"
list=
"{'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}"
name=
"friends"
/>
<s:checkbox
tooltip=
"Confirmed that your are Over 18"
label=
"Age 18+"
name=
"legalAge"
/>
<s:doubleselect
tooltip=
"Choose Your State"
label=
"State"
name=
"region"
list=
"{'North', 'South'}"
value=
"'South'"
doubleValue=
"'Florida'"
doubleList=
"top == 'North' ? {'Oregon', 'Washington'} : {'Texas', 'Florida'}"
doubleName=
"state"
headerKey=
"-1"
headerValue=
"---------- Please Select ----------"
emptyOption=
"true"
/>
<s:file
tooltip=
"Upload Your Picture"
label=
"Picture"
name=
"picture"
/>
<s:optiontransferselect
tooltip=
"Select Your Favourite Cartoon Characters"
label=
"Favourite Cartoons Characters"
name=
"leftSideCartoonCharacters"
leftTitle=
"Left Title"
rightTitle=
"Right Title"
list=
"{'Popeye', 'He-Man', 'Spiderman'}"
multiple=
"true"
headerKey=
"headerKey"
headerValue=
"--- Please Select ---"
emptyOption=
"true"
doubleList=
"{'Superman', 'Mickey Mouse', 'Donald Duck'}"
doubleName=
"rightSideCartoonCharacters"
doubleHeaderKey=
"doubleHeaderKey"
doubleHeaderValue=
"--- Please Select ---"
doubleEmptyOption=
"true"
doubleMultiple=
"true"
/>
<s:textarea
label=
"Your Thougths"
name=
"thoughts"
tooltip=
"Enter your thoughts here"
/>
<s:submit onclick=
"alert('aaaa');"
/>
<s:reset onclick=
"alert('bbbb');"
/>
</s:form>
</body>
</html>