日期控件
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
<title>使用s:datetimepicker生成日期选择框</title>
<s:head theme="ajax" /> //一定加上theme,否则下面的时间显示不出来
</head>
<body>
<h3>使用使用s:datetimepicker生成日期选择框</h3>
<s:form theme="simple">
日期选择部件,指定toggleType属性,且指定value="today"<br>
<s:datetimepicker name="order.date" label="购买日期" toggleType="explode" value="today"/><hr>
日期选择部件,指定了format属性<br>
<s:datetimepicker name="order.date" label="购买日期" displayFormat="yyyy年MM月dd日"/><hr>
日期选择部件,指定了weekStartsOn属性<br>
<s:datetimepicker name="order.date" label="购买日期" displayFormat="yyyy年MM月dd日" weekStartsOn="2"/><hr>
时间选择部件<br>
<s:datetimepicker label="开始时间" name="start" type="time" value="13:00" language="en-us"/>
</s:form>
Tree控件
<%@ page contentType="text/html; charset=GBK" language="java"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>使用s:tree和s:treenode标签生成静态树</title>
<s:head theme="ajax" debug="true"/>
</head>
<body>
<h3>使用s:tree和s:treenode标签生成静态树</h3>
<s:tree label="计算机图书" id="books" theme="ajax"
showRootGrid="true" showGrid="true" treeSelectedTopic="treeSelected">
<s:treenode theme="ajax" label="工业出版社" id="industrialization">
<s:treenode theme="ajax" label="Spring" id="spring"/>
<s:treenode theme="ajax" label="Hibernate" id="Hibernate"/>
<s:treenode theme="ajax" label="Struts1.x" id="s1"/>
<s:treenode theme="ajax" label="Struts2.x" id="s2"/>
</s:treenode>
<s:treenode theme="ajax" label="铁道出版社" id="railroad">
<s:treenode theme="ajax" label="Java Web编程技术" id="Java_Web"/>
</s:treenode>
<s:treenode theme="ajax" label="水利出版社" id="water">
<s:treenode theme="ajax" label="Java高级编程" id="java"/>
</s:treenode>
</s:tree>
</body>
</html>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/guoquanyou/archive/2008/12/05/3453622.aspx