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

variations don't work when using wicket:link with images

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.9
    • 1.4.10, 1.5-M1
    • wicket
    • None

    Description

      I'm trying to use variations with images that are automatically
      localized when they are within wicket:link. When I turned on debugging
      I could see that it tries to get the image for the current locale, or
      one without locale extension when it is not available (logo_nl.png
      versus logo.png). However when I change getVariation() on the page,
      nothing notable happened in the debug statements.

      So I started debugging and I found out that Component.getStyle is
      actually called, but will never give a result, as the parent is
      consulted to get the variation, however the automatically added
      components of type AutoLinkResolver$ResourceReferenceAutolink do not
      get a parent when they are created.
      Could this be a bug? I would expect the variation to be used when I
      autolink an image within a normal page.

      Attachments

        1. WICKET-2904.patch
          2 kB
          Martin Grigorov
        2. variationbug.tar.gz
          27 kB
          Wouter de Vaal

        Activity

          People

            ivaynberg Igor Vaynberg
            wouterv Wouter de Vaal
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: