Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4141

Automatic Linking in base page broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0, 1.5.1
    • 1.5.2
    • wicket
    • None
    • Windows XP, Eclipse 3.7, Oracle JDK 6

    Description

      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); }

      Attachments

        1. WICKET-4141-autolink-bug.zip
          46 kB
          Johan Stenberg
        2. WICKET-4141.patch
          8 kB
          Andrea Del Bene

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              johan1 Johan Stenberg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: