Wicket
  1. Wicket
  2. WICKET-3640

getSharedResources().putClassAlias() no longer exists in 1.5

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 1.5-RC2, 1.5-RC3
    • Fix Version/s: None
    • Component/s: wicket
    • Environment:
      N/A

      Description

      I was told on the user list to open a ticket for this missing API call. Not sure whether it is a "gap" in 1.5 or there's some alternative (see: http://apache-wicket.1842946.n4.nabble.com/MIIGRATE-1-5-Where-is-quot-getSharedResources-putClassAlias-quot-td3471235.html ).

      I used to publish dynamic image resources (retrieved from DB) as follows:

      protected void init()

      { super.init(); getSharedResources().putClassAlias(org.apache.wicket.Application.class, "global"); getSharedResources().add("images", new ImageResources()); }

      The above would let my image resource reply to the URL:

      http://host/resources/global/images?params=...

      In 1.5, the SharedResources class no longer has a "putClassAlias()" method, so apparently there's something new.

      How do we go about doing this with 1.5?

        Activity

        Hide
        Martin Grigorov added a comment -

        This use case is easily supported by WebApplication#mountResource("/global/images", new ImageResourceReference());
        ImageResourceReference should extend ResourceReference and its #getResource() should return ImageResources.

        No need to support aliases.

        Show
        Martin Grigorov added a comment - This use case is easily supported by WebApplication#mountResource("/global/images", new ImageResourceReference()); ImageResourceReference should extend ResourceReference and its #getResource() should return ImageResources. No need to support aliases.

          People

          • Assignee:
            Unassigned
            Reporter:
            Alexandros Karypidis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development