Hi!
I am tring to migrate a wicket 1.2 app to wicket 1.3 (because we hit a
blocking issue with ajax calls on dataviews in 1.2.
The problem is that the way wicket calculates path information seems to have
changed. Our architecture that uses wicket as one of several possible
rendering technologies in zones of a "workbench" relies on the wicket
request paths. Let me try to explain a little:
We have a wicket servlet mapped as /app/wicketservlet
We have a main servlet: /app/mainservlet and on our page we run the
following javascript code:
var req=new Ajax.Request('/app/view',{method: 'get',parameters: 'viewid=' +
viewid,onLoaded: function(){},onComplete: function(){div.innerHtml =
req.transport.responseText);}});
This "view" servlet has a registry of all screens and do a forward with the
correct one like the following:
req.getRequestDispatcher("/app/wicketservlet/mountPoint/Page/variant/myVariant").forward(req,
res);
This used to work on wicket 1.2...
But as wicket 1.3 has relative path, all my buttons/resources are refering
to ../../../
If I were on /app/wicketservlet/mountPoint/Page/variant/myVariant this will
work...
But I'm on /app/mainservlet.. So, all my references are lost...
I've tried to do a search/replace on "req.transport.responseText" to change
../../../ to correctly absolute path as it used to be...
Then, the resources (images, css) came back, my wicket ajax submit buttons
are doing the request to server (onClick methods are called server-side),
but the problem is that my components on client-side (the ones at
AjaxRequestTarget.addComponent), are not updated at all..
What can I do? Please help!
Renan Camponez