struts常用标签汇总UI部分[原创]
时间:2010-06-11 来源:hkebao
整理了一些常用的标签。代码
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<s:head/>
</head>
<body>
<s:form action="exampleSubmit" method="post" enctype="multipart/form-data" tooltipConfig="#{'jsTooltipEnabled':'true'}">
<s:datetimepicker tooltip="Select Your Birthday"
label="Birthday"
name="birthday" ></s:datetimepicker>
<s:textarea
tooltip="Enter your Biography"
label="Biograph"
name="bio"
cols="20"
rows="3"/>
<s:checkbox
tooltip="Confirmed that your are Over 18"
label="Age 18+"
name="legalAge"/>
<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:submit onclick="alert('aaaa');" />
<s:reset onclick="alert('bbbb');" />
</s:form>
</body>
</html>
运行了一下我发现STRUCTS标签库确实非常不错感觉好像是集成了好的JS东西在里面的。这个要好好学习学习下UI方面的标签!
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<s:head/>
</head>
<body>
<s:form action="exampleSubmit" method="post" enctype="multipart/form-data" tooltipConfig="#{'jsTooltipEnabled':'true'}">
<s:datetimepicker tooltip="Select Your Birthday"
label="Birthday"
name="birthday" ></s:datetimepicker>
<s:textarea
tooltip="Enter your Biography"
label="Biograph"
name="bio"
cols="20"
rows="3"/>
<s:checkbox
tooltip="Confirmed that your are Over 18"
label="Age 18+"
name="legalAge"/>
<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:submit onclick="alert('aaaa');" />
<s:reset onclick="alert('bbbb');" />
</s:form>
</body>
</html>
运行了一下我发现STRUCTS标签库确实非常不错感觉好像是集成了好的JS东西在里面的。这个要好好学习学习下UI方面的标签!
相关阅读 更多 +