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

Default value support for ValueMapValue

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Sling Models
    • None

    Description

      The current solution approach seems to be moving away from having multiple annotations attached to a field more towards having the injectors support a set of parameters that do the same job.

      Currently, it is possible to combine the

      @Default (values = "myvalue")
      

      annotation with a

      @ValueMapValue
      

      It would be nice if the default value could be handled as a parameter of ValueMapValue instead

      So instead of:

      @ValueMapValue
      @Default (values = "myvalue")
      String fieldname;
      

      it would be nice to support:

      @ValueMapValue(defaults = "myvalue")
      String fieldname;
      

      I think this would be in line with the solution approach taken for the injector specific annotations

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              voelin noel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: