Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2798

Domain-to-string converter not registered if pushed in

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      To replicate:

      1. Run the vote.roo script
      2. Quit the Roo shell
      3. Push in the "getChoiceToStringConverter" method from ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj
      4. Upon restarting the Roo shell, the above ITD's installLabelConverters method now looks like this (i.e. the Converter<Choice, String> returned by the pushed-in method is no longer being registered):
      public void ApplicationConversionServiceFactoryBean.installLabelConverters(FormatterRegistry registry) {
          registry.addConverter(getIdToChoiceConverter());
          registry.addConverter(getStringToChoiceConverter());
          registry.addConverter(getVoteToStringConverter());
          registry.addConverter(getIdToVoteConverter());
          registry.addConverter(getStringToVoteConverter());
      }

      The effect at runtime is that Choice#toString() is called instead of the converter being used. You can see this in the "Create new Vote" screen, in the drop-down of Choice instances.

        Attachments

          Activity

            People

            Assignee:
            sschmidt Stefan Schmidt
            Reporter:
            aswan Andrew Swan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: