[xwiki-devs] Help! Velocity can not render database related GWT application right.
Dear XWiki Devs, Here is the recap of the last conversation: ----------------------------------------------------------------------------Recap Below-----------------------------------------------------------------------------------------
"Two questions: (1) do you get the same velocity exception when viewing the Panels.YourPanelName page? (2) When you get the velocity exception, is your JavaScript file loaded properly? Check with firebug in the header of the edited page for the associated script tag."
(1). Yes, I get exception when viewing the Panels. Here is visual:
http://picasaweb.google.com/lh/photo/0ZTNIoSvoAWZe9NveH_3SA?feat=directlink So the panel is rendered fine,
(2). Here is the pic, I do not think they are loaded right. http://picasaweb.google.com/lh/photo/U826Ehn6oVWcxiGoUZBsrA?feat=directlin
but your JavaScript file (designrationaletreeview.nocache.js) is not loaded correctly. I noticed that the application context path you're using is "xwiki-enterprise-web-2.1.1" instead of "xwiki" (e.g. http://localhost:8080/xwiki-enterprise-web-2.1.1/bin/view/Panels/DesignRationale<http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A8080%2Fxwiki-enterprise-web-2.1.1%2Fbin%2Fview%2FPanels%2FDesignRationale&sa=D&sntz=1&usg=AFrqEzdZiRwkLDbnjeg4JJdM7VFuSK3EPw> ). AFAIK you have to do some configurations if you want a different context path. My advice is to use the default one, "xwiki". 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. ------------------------------------------------------------------------------Recap Above--------------------------------------------------------------------------------------------------- I can load other GWT(JavaScript) app in XWiki and Edit Sidebar (or say velocity can render them right). I think the difference of loading other non-database GWT application and DesignRationale Tree View is DR Treeview require make a rpc call to server and somehow the velocity could not render it right. Do I need to use XWiki's api to make the rpc call? Or use the Hiberbinate? Can you give me some suggestion how can I fit the Treeview into the XWiki? I deployed the the DR tree view outside of XWiki as a single application it work fine in web.xml, like this: <servlet-mapping> <servlet-name>treeParentServiceImpl</servlet-name> <url-pattern>/designrationaletreeview/treeParent</url-pattern> </servlet-mapping> But when I deploy it within XWiki context, and writing servlet-mapping in web.xml, velocity could not render it right. Should I change the strut stuff? Thank you all! Leon
Hi Leon, Leon Wang wrote:
Dear XWiki Devs,
Here is the recap of the last conversation:
----------------------------------------------------------------------------Recap Below-----------------------------------------------------------------------------------------
"Two questions: (1) do you get the same velocity exception when viewing the Panels.YourPanelName page? (2) When you get the velocity exception, is your JavaScript file loaded properly? Check with firebug in the header of the edited page for the associated script tag."
(1). Yes, I get exception when viewing the Panels. Here is visual:
http://picasaweb.google.com/lh/photo/0ZTNIoSvoAWZe9NveH_3SA?feat=directlink
So the panel is rendered fine,
(2). Here is the pic, I do not think they are loaded right. http://picasaweb.google.com/lh/photo/U826Ehn6oVWcxiGoUZBsrA?feat=directlin
but your JavaScript file (designrationaletreeview.nocache.js) is not loaded correctly. I noticed that the application context path you're using is "xwiki-enterprise-web-2.1.1" instead of "xwiki" (e.g. http://localhost:8080/xwiki-enterprise-web-2.1.1/bin/view/Panels/DesignRationale<http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A8080%2Fxwiki-enterprise-web-2.1.1%2Fbin%2Fview%2FPanels%2FDesignRationale&sa=D&sntz=1&usg=AFrqEzdZiRwkLDbnjeg4JJdM7VFuSK3EPw> ). AFAIK you have to do some configurations if you want a different context path. My advice is to use the default one, "xwiki".
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?
------------------------------------------------------------------------------Recap Above---------------------------------------------------------------------------------------------------
I can load other GWT(JavaScript) app in XWiki and Edit Sidebar (or say velocity can render them right). I think the difference of loading other non-database GWT application and DesignRationale Tree View is DR Treeview require make a rpc call to server and somehow the velocity could not render it right. Do I need to use XWiki's api to make the rpc call? Or use the Hiberbinate? Can you give me some suggestion how can I fit the Treeview into the XWiki? I deployed the the DR tree view outside of XWiki as a single application it work fine in web.xml, like this:
<servlet-mapping> <servlet-name>treeParentServiceImpl</servlet-name> <url-pattern>/designrationaletreeview/treeParent</url-pattern> </servlet-mapping>
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. Marius
But when I deploy it within XWiki context, and writing servlet-mapping in web.xml, velocity could not render it right. Should I change the strut stuff?
Thank you all!
Leon _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 02/19/2010 06:27 AM, Leon Wang wrote:
(2). Here is the pic, I do not think they are loaded right. http://picasaweb.google.com/lh/photo/U826Ehn6oVWcxiGoUZBsrA?feat=directlin
Looks like the script is parsed by the velocity engine, and it shouldn't. Don't use 'true' when including the file. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Leon Wang -
Marius Dumitru Florea -
Sergiu Dumitriu