Great! Thank you very much. I get new url through IRequestCodingStrategy#rewriteStaticRelativeUrl(String url):
String newUrl = RequestCycle.get().getProcessor().getRequestCodingStrategy().rewriteStat icRelativeUrl(urlToChange); MB -----Original Message----- From: Pedro Santos [mailto:[email protected]] Sent: Thursday, September 24, 2009 1:33 PM To: [email protected] Subject: Re: image html element's (img) src attribute processing 1) Where exactly is the code which doing this? http://wicket.apache.org/docs/1.4/org/apache/wicket/request/IRequestCodi ngStrategy.html 2) How can I obtain this changed url for static resources? You can create an resource reference to your image resource. http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wic ket/ResourceReference.html On Thu, Sep 24, 2009 at 6:13 AM, Bernhard Michal <[email protected]>wrote: > > Hello everyone. > > I noticed that wicket automatically translate url in img's src > attribute in html to the right url regarding to changed url context. > I mean when I've got eg. link <img src="/img/someimage.png"> and that > page is rendered in some context for example "/appContext/" the src > attribute is automatically changed to something like this: <img > src="/../img/someimage.png"> (notice two dots) to reflect changed > context (and link still the same resource) > > 1) Where exactly is the code which doing this? > 2) How can I obtain this changed url for static resources? > > I am asking this because I've got some static resources (javascripts) > and I need to know their relative url regarding to changed context. > > Thank you for your response. > > Best wishes > > MB > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Pedro Henrique Oliveira dos Santos --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
