Automatic Linking in base page broken
-------------------------------------
Key: WICKET-4141
URL: https://issues.apache.org/jira/browse/WICKET-4141
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.1, 1.5.0
Environment: Windows XP, Eclipse 3.7, Oracle JDK 6
Reporter: Johan
Attachments: WICKET-4141-autolink-bug.zip
Automatic linking used in base pages is broken.
The attached quickstart application contains a base page
wicket.bugs.autolink.page.base.BasePage which has a relative image reference:
<img src="theme/logo.png" border="1" width="50px" height="50px" />
When accessing this page via http://localhost:8080/base the image is rendered
as expected.
The generated HTML output is:
<img
src="wicket/resource/wicket.bugs.autolink.page.base.BasePage/theme/logo-ver-1319028241918.png"
border="1" width="50px" height="50px"/>
The application contains a second page wicket.bugs.autolink.page.home.HomePage
extending the BasePage.
When accessing this page via http://localhost:8080/home the image inherited
from the base page is not displayed.
The inherited image reference is rendered as:
<img src="theme/logo.png" border="1"
onclick="window.location.href='theme/logo.png';return false;"/>
=> Problem 1: theme/logo.png is not autolinked anymore, it should point to
wicket/resource/wicket.bugs.autolink.page.base.BasePage/theme/logo-ver-1319028241918.png
=> Problem 2: for some reasons a onclick event is rendered by Wicket
I configured the Wicket app with:
public void init()
{
super.init();
getMarkupSettings().setAutomaticLinking(true);
getResourceSettings().setParentFolderPlaceholder("$up$");
mountPage("/home", HomePage.class);
mountPage("/base", BasePage.class);
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira