惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - netshuai

免安装Oracle客户端使用PL/SQL连接Oracle的2种方法 优化MyEclipse7.5 WebService大讲堂之Axis2(9):编写Axis2模块(Module) WebService大讲堂之Axis2(10):使用soapmonitor模块监视soap请求与响应消息 WebService大讲堂之Axis2(7):将Spring的装配JavaBean发布成WebService WebService大讲堂之Axis2(8):异步调用WebService WebService大讲堂之Axis2(5):会话(Session)管理 WebService大讲堂之Axis2(6):跨服务会话(Session)管理 WebService大讲堂之Axis2(4):二进制文件传输 WebService大讲堂之Axis2(3):使用services.xml文件发布WebService WebService大讲堂之Axis2(2):复合类型数据的传递 (转)WebService大讲堂之Axis2(1):用POJO实现0配置的WebService J2EE项目代码编写规范 Dom4j入门 编码 GBK 的不可映射字符 ognl表达式用法笔记 - netshuai - 博客园 struts2中减少action数量(通配符使用) struts2校验框架之Visitor校验器 加快MyEclipse启动速度
struts2.1.6 datetimepicker标签不能使用的问题解决
netshuai · 2009-08-04 · via 博客园 - netshuai

在以前的struts2版本中datetimepicker只需要在head标签处设置
<s:head />,
就可以直接使用s:datetimepicker的标签了。
而在2.1.6版本中不能直接这样使用了,将datetimepicker移除了。
原因是此标签调用了dojo的datetimepicker的库。
所以现在使用的时候首先要导入一个库。

  • struts2-dojo-plugin-2.1.6.jar。


然后还要设置dojo的taglib

  1. <%@ taglib prefix="sd" uri="/struts-dojo-tags" %>   

同样也需要对theme进行设置

  1. <s:head theme="xhtml"/>   
  2. <sd:head parseContent="true"/>  

上面的设置在head标签中。
然后使用sd:datetimepocker就可以实现了。

设置formatLength为long的datetimepicker标签 value="today"默认显示当前日期,若想显示其他日期格式为value="%{'2009-1-1'}"

  1. <sd:datetimepicker toggleType="explode" value="today" formatLength="long" />  

设置displayFormat参数为“yyyy年MM月dd日”
displayWeeks参数为2的datetimepicker标签

  1. <sd:datetimepicker displayFormat="yyyy年MM月dd日" displayWeeks="2" />  

设置weekStartsOn参数为1,toggleType参数为fade的datetimepicker标签

  1. <sd:datetimepicker weekStartsOn="1" toggleType="fade" />  

设置显示时间datetimepicker标签

  1. <sd:datetimepicker type="time" value="8:30" />