Maybe the answer to the following question is the problem's solution:
How it is intented to add an own IAutolinkResolverDelegate to the
AutoLinkResolver?

Tom


Thomas Singer-4 wrote:
> 
> I have a WebPage pages.Index (mapping to "/index.html") whose markup 
> contains an img-tag with the relative path "../../../screenshots/foo.png" 
> (the 1st "../" to get out of the "pages"-package, the 2nd "../" to get out 
> of the "classes"-directory, the third "../" to get out of the 
> "WEB-INF"-directory). This has the advantage, that the path is already
> valid 
> in my undeployed project.
> 
> Unfortunately, the autolink resolver seems not able to convert it to a
> valid 
> path:
> 
>> java.lang.IllegalArgumentException: Invalid path
>> ../../../screenshots/foo.png
>>      at wicket.util.lang.Packages.absolutePath(Packages.java:109)
>>      at wicket.util.lang.Packages.absolutePath(Packages.java:46)
>>      at
>> wicket.markup.html.PackageResource.exists(PackageResource.java:263)
>>      at
>> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceAutolink.<init>(AutoLinkResolver.java:547)
>>      at
>> wicket.markup.resolver.AutoLinkResolver$AbstractAutolinkResolverDelegate.newPackageResourceReferenceAutoComponent(AutoLinkResolver.java:118)
>>      at
>> wicket.markup.resolver.AutoLinkResolver$ResourceReferenceResolverDelegate.newAutoComponent(AutoLinkResolver.java:620)
>>      at
>> wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:832)
>>      at
>> wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:763)
>>      at wicket.MarkupContainer.renderNext(MarkupContainer.java:1361)
>> ...
> 
> I would have expected it to convert the path to "/screenshots/foo.png".
> How 
> can I work around this issue? Is it possible to plug in an own resolver 
> implementation? If so, where can I find some documentation (beside digging 
> the source code)?
> 

-- 
View this message in context: 
http://www.nabble.com/autolink-problem-with-img-and-relative-path-tf3761166.html#a10652747
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to