Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4242

Sling Models: make enums injectable from Resource/ValueMap

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • Sling Models API 1.1.0, Sling Models Implementation 1.1.0
    • None
    • Extensions

    Description

      As of Sling Models 1.1.0 it seems to not be possible to inject enum values from Resources and ValueMaps.

      A custom injector could provide that feature. GitHub gist: https://gist.github.com/dherges/5d8f3c6b6821759cfa1c

      Question remains whether it is a good idea to do String-to-Enum-mapping in Sling Models?

      Alternative would be to have ResourceDecorators/ValueMapDecorators that already hold enum values.

      Attachments

        Activity

          People

            Unassigned Unassigned
            haggis David Herges
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: