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

Autolinking not working as soon as component gets a wicket:id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.7
    • 6.14.0, 7.0.0-M1
    • wicket
    • None

    Description

      While migrating from 1.4.X, we encounter a lot of pages having an image with a relative URL set in the HTML, for example <img src="img/logo.gif"/>.
      Now on some pages, those images need to be references, mainly to alter the visibility logic or add an attribute modifier of some kind. Now as soon as we do
      <img wicket:id="logo" src="img/logo.gif"/>
      and add it using add(new WebMarkupContainer("logo")) , autolinking does not work anymore and the src is left as-is.
      Moving all sources to the java files and use ContextImage etc is no real option as this would be a lot of work and wouldn't make the html readable anymore as it would become hard to find all references to the images and also isn't logical to have the URL in the java files even though it's static and doesn't change.

      Attachments

        1. WICKET-4697.zip
          41 kB
          Matthias Keller

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            tapter Matthias Keller
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: