Hi Leon,

Leon Wang wrote:
> Hi Marius,
> 
> Also, can you check if the URL from the script tag points indeed to your
>> JavaScript file? I can see only the final part of the URL (the file
>> name) in the picture. Paste here the URL.
> 
> Any feedback on this? Did you changed the application context path to
> "xwiki"? Is the script tag pointing to the right URL?
> 
> Yes, I have change the context path to xwiki. I think the script tag
> pointing to the right URL. I copyed the non-database GWT app in the same
> folder which is
> \apache-tomcat\webapps\xwiki\resources\js\xwiki\designrationaletypetree and

> I can loaded it into edit sidebar without any problems. The script tag
> is 
> $xwiki.jsfx.use("js/xwiki/designrationaletreeview/designrationaletreeview.nocache.js",
> true), and It is pointed to the right URL.

This is not the script tag. This is just the velocity code that includes 
the JavaScript code in your HTML page. This code generates a script HTML 
tag inside the head element of your HTML page. The script tag has a src 
attribute whose value is an URL. This is the URL used to retrieve the 
JavaScript file. If this URL is incorrect then your JavaScript file is 
not loaded. You can check the URL by looking in Firebug's HTML tab, 
expanding the head element.

Anyway, why do you pass the "true" parameter to the $xwiki.jsfx.use 
method? This way you are forcing the skin action. This is needed only 
for resources (including JavaScript files) that need to be parsed with 
velocity. The JavaScript file generated by GWT doesn't contain velocity 
code for sure.

> 
> Firebug's console displays all GWT-RPC requests you make so it's easy to
> detect if (1) the request is send to the right URL and (2) the response
> is correct.
> 
> I think it did not get to the point that making the RPC request, from the
> net tab of Firebug. One thing I think worth noticing is that the request url

You don't have to look in the net tab for GWT-RPC requests. They are 
displayed in the console tab.

> is that

> localhost:8000/xwiki/bin/skin/resources/js/xwiki/designrationaletreeview/designrationaletreeview.nocache.js
> while I think it should not have "skin" in it. I do not know why the url is
> look like that. I saw the request to get designrationaletreeview.nocache.js

This is because you are forcing the skin action by passing the "true" 
parameter to the $xwiki.jsfx.use method. You have to pass only the path 
to the JavaScript file.

Marius

> (Here is the screenshot:
> http://picasaweb.google.com/lh/photo/R5iBi4i8hRuuTd-M0Jb55Q?feat=directlink),
> under the Header tag:
> 
> Response Headers:
> ServerApache-Coyote/1.1Last-Modified Fri, 19 Feb 2010 17:05:54 GMT
> Cache-Controlpublic ExpiresSun, 21 Mar 2010 17:05:54 GMT Content-Type
> text/javascript;charset=UTF-8Content-Language enContent-Length8639 DateFri,
> 19 Feb 2010 17:05:54 GMT
> Request Header:
> Host localhost:8080User-AgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
> rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 QQDownload/1.7 Accept*/*
> Accept-Language en-us,en;q=0.5Accept-Encodinggzip,deflate Accept-Charset
> ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive300Connection keep-aliveReferer
> http://localhost:8080/xwiki/bin/view/Panels/DesignRationaleTreeView
> CookieJSESSIONID=8D3407935F56F210EB2BFE1CF29BB34B;
> language=en; username=FS1YvSKKiX8_; password=FS1YvSKKiX8_; rememberme=true;
> validation=1bc347cc9d3bf770c6c23d35886d4012
> 
> Under the response tag:
> 
> <a href="" 
> onclick="document.getElementById('xwikierror1').style.display='block';
> return false;">Error number 4001 in 4: Error while parsing velocity
> page xwiki:resources.jsWrapped Exception: Failed to evaluate content
> with id [xwiki:resources.js]</a><div id="xwikierror1" style="display:
> none;"><pre class="xwikierror">Error number 4001 in 4: Error while
> parsing velocity page xwiki:resources.jsWrapped Exception: Failed to
> evaluate content with id
> [xwiki:resources.js]com.xpn.xwiki.XWikiException: Error number 4001 in
> 4: Error while parsing velocity page xwiki:resources.jsWrapped
> Exception: Failed to evaluate content with id [xwiki:resources.js]    at
> com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
> 
> 
> Thank you, Marius!
> 
> Leon
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to