Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7803

Multibinding in different scopes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.2
    • 6.0
    • None
    • None

      • Registering a multibinded component in an UI scope (e.g. admicentral scope) results into:

         1) No implementation for info.magnolia.ui.framework.layout.field.FieldDescriptionProducer$Definition annotated with info.magnolia.ui.framework.ioc.AdmincentralImpl@3aa25edc was bound.

      This can be workarounded with:

      info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule#addMultiBinding
      -        multiBinder.addBinding().to(key);
      +        multiBinder.addBinding().to(key.getTypeLiteral());
      

      This allow usage both main and admincentral scopes.

      Usage of other scopes is still not possible though, defining a multibinding e.g. in the app-pages-app scope results into

      Caused by: info.magnolia.objectfactory.MgnlInstantiationException: Failed to resolve param [0] of type [interface java.util.Set]

      in both admicentral and app scopes ("destroys working multibinded component for admicentral as well".

        Acceptance criteria

              rkovarik Roman Kovařík
              rkovarik Roman Kovařík
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 2d 2h 26m
                    2d 2h 26m