An update:
I see now from the Tapestry source that the EngineServiceLink (made from
constructLink in AbstractService) only encodes the url  if the service
calls constructLink with the stateful flag set. 
I misinterpreted this as the Service/Page being stateful, and that
something would be put in the visit object. 

Guess I was wrong.

For the first problem described in the previous post, I still have to do
the following to get the url right;

ILink resourceLink = resourceService.getLink(requestCycle, this, new
Object[]{param});

String contextName = requestCycle.getEngine().getContextPath();
String url = resourceLink.getURL();
url = url.substring( url.lastIndexOf(contextName)+contextName.length());
url = requestCycle.encodeURL(url);
setImageIconAsset(new ContextAsset(
  new ContextResourceLocation( 
    requestCycle.getRequestContext().getServlet().getServletContext(),
    url
    ),null /*no ILocation since this is a dynamic added asset*/
));

Although it was possible doing this in a bit less wordier fashion than
in my last post, it is still cumbersome.

Does anyone have any tips to do this in a more "correct" way?

And hope my newbism  isn't too painful to you all.

Regards, 

Olve Hansen



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to