MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-128

Injection in BV MessageInterpolator does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.9.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2

      Description

      The getMessageInterpolator() method in InvalidValueAwareValidatorFactory do injection into the wrong MessageInterpolator.
      In my opinion CODI should do injection into the unwrapped MessageInterpolator (getValidatorFactory().getMessageInterpolator()).
      I have tested this in my environment and works without problems.

        Activity

        Hide
        Gerhard Petracek added a comment -

        it's possible to wrap it multiple times -> dependency injection isn't supported for custom implementations of MessageInterpolator.
        it would be possible based on reflection - however, that would reduce the performance significantly.
        resolving beans is also possible via methods of the BeanManager - use BeanManagerProvider.getInstance().getBeanManager() to get the BeanManager.

        the implementation is correct - injection for InvalidValueAwareMessageInterpolator is performed for injecting MessageContext and Logger.

        Show
        Gerhard Petracek added a comment - it's possible to wrap it multiple times -> dependency injection isn't supported for custom implementations of MessageInterpolator. it would be possible based on reflection - however, that would reduce the performance significantly. resolving beans is also possible via methods of the BeanManager - use BeanManagerProvider.getInstance().getBeanManager() to get the BeanManager. the implementation is correct - injection for InvalidValueAwareMessageInterpolator is performed for injecting MessageContext and Logger.

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Andraschko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development