Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何通过ScriptInjector在GWT中使用JS库?_Javascript_Gwt - Fatal编程技术网

Javascript 如何通过ScriptInjector在GWT中使用JS库?

Javascript 如何通过ScriptInjector在GWT中使用JS库?,javascript,gwt,Javascript,Gwt,我想在GWT中使用javascript库 我将文件放在公用文件夹中,以便在客户端和服务器之间共享,并在本教程()之后注入javscript 每次我执行我的javscriptcode时,我都会得到一个“NotaFunction”异常 public static native void drawScheduler() /*-{ var calendar = $doc.getElementById("calendar"); calendar.fullCalendar({

我想在GWT中使用javascript库

我将文件放在公用文件夹中,以便在客户端和服务器之间共享,并在本教程()之后注入javscript

每次我执行我的javscriptcode时,我都会得到一个“NotaFunction”异常

   public static native void drawScheduler() /*-{

    var calendar = $doc.getElementById("calendar");
    calendar.fullCalendar({
        defaultView: 'timelineMonth',
        events: [
            // events go here
        ],
        resources: [
            // resources go here
        ]
        // other options go here...
    });

}-*/;

假设
fullCalendar
来自jQuery插件,则DOM元素不会被修改;您需要将它包装在jQuery“对象”(通常是
$(日历)
,这里可能是
$win.$(日历)

您使用的gwt版本是什么?
   public static native void drawScheduler() /*-{

    var calendar = $doc.getElementById("calendar");
    calendar.fullCalendar({
        defaultView: 'timelineMonth',
        events: [
            // events go here
        ],
        resources: [
            // resources go here
        ]
        // other options go here...
    });

}-*/;