`
liuwei1981
  • 浏览: 752686 次
  • 性别: Icon_minigender_1
  • 来自: 太原
博客专栏
F8258633-f7e0-30b8-bd3a-a0836a5f4de5
Java编程Step-by...
浏览量:156189
社区版块
存档分类
最新评论

使用struts2的datetimepicker标签时候遇到JS错误:dojo未定义错误

阅读更多

一个页面中使用了datetimepicker标签,结果浏览器提示了js错误:dojo未定义

下面是页面代码:

<s:form name="form1" method="post" action="create_user" theme="simple">
   <s:datetimepicker name="userAdmin.birthday" displayFormat="yyyy-MM-dd"/>
<s:form>

 

找到了解决办法:
在页面的<head>标签中加入<s:head /> 如下:

<head> 
<title>Struts 2 Cool Tags - Others</title> 
.....
<s:head />  
</head> 

 

再运行就是漂亮的日期选择界面了

分享到:
评论
4 楼 feryy 2009-02-02  
liuwei1981 写道
feryy 写道
我的还是提示有问题啊
2009-02-02 14:00:09,823 ERROR (org.apache.struts2.dispatcher.Dispatcher:512) - Could not find action or result
There is no Action mapped for action name dojo.js. - [unknown location]

struts2的action配置问题吧,你把action的名称配置成dojo.js了


我不想显示action扩展名啊
struts.action.extension=

就出现这个问题了
3 楼 liuwei1981 2009-02-02  
feryy 写道
我的还是提示有问题啊
2009-02-02 14:00:09,823 ERROR (org.apache.struts2.dispatcher.Dispatcher:512) - Could not find action or result
There is no Action mapped for action name dojo.js. - [unknown location]

struts2的action配置问题吧,你把action的名称配置成dojo.js了
2 楼 feryy 2009-02-02  
我的还是提示有问题啊
2009-02-02 14:00:09,823 ERROR (org.apache.struts2.dispatcher.Dispatcher:512) - Could not find action or result
There is no Action mapped for action name dojo.js. - [unknown location]
1 楼 zilang9 2009-02-02  
很好
    

相关推荐

Global site tag (gtag.js) - Google Analytics