论坛首页 Java版 Struts

struts2 datetimepicker 标签无法显示

浏览 2085 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
时间:2007-08-17 关键字: struts2 tag
网上查了很多,基本都是说缺少<s:head theme="ajax"/>引起的问题,以或者是template/simple/head.ftl文件中/struts/dojo路径问题
而我确定加入了<s:head theme="ajax"/>,页面生成后firefox错误控制台也没有报任何错误,生成页面的js代码
<script type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "/struts/dojo",
        isDebug: false,
        bindEncoding: "GBK",
        debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
    };
</script>
<script type="text/javascript"
        src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
        src="/struts/simple/dojoRequire.js"></script>

<script type="text/javascript"
        src="/struts/ajax/dojoRequire.js"></script>
<script type="text/javascript"
        src="/struts/CommonFunctions.js"></script>

<script type="text/javascript">
    dojo.require("dojo.widget.DatePicker");
</script>
<div
        dojoType="dropdowndatepicker"    id="goods_todayDate"    name="dojo.todayDate"    inputName="todayDate"    displayFormat="yyyy-MM-dd"  saveFormat="rfc"></div>

也试着访问了每个JS文件,都可以访问到,可是datetimepicker控件在页面就是无法显示,我实在是无语了...
   
时间:2007-09-03
我也碰到datetimepicker的问题``

原因出在我的JSP页面放在一个子目录里``放根目录下就没事`
   
0 请登录后投票
时间:2008-01-03
冲突了哦,<s:head theme="ajax"/>,
去掉就可以了。再引用你的DOJO的新包就可以了
   
0 请登录后投票
时间:2008-01-11
不是吧,直接用<s:head/> 就ok了,不用这个的话js脚本什么的都不能生成
   
0 请登录后投票
时间:2008-01-17
看看你是否在properties 文件中指定模板类型
   
0 请登录后投票
时间:2008-01-21
我也碰到这个问题,在本地tomcat上运行没出错,部署到服务器就出了这个问题。
   
0 请登录后投票
时间:2008-01-21
struts.serve.static=false
把static资源copy出来放文件系统中,就有问题。估计是utf-8,ansi编码不同引起的。正准备尝试统一编码。
   
0 请登录后投票
论坛首页 Java版 Struts

跳转论坛:
JavaEye推荐