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

Default value support for ValueMapValue

    XMLWordPrintableJSON

Details

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

    Description

      Currently, It is possible to set a default value for a ValueMapValue injection by combining it with the

      @Default (values = "standardbuttonwhite")
      {code:java}
      annotation. 
      
      Since most features moved away from an "additional annotation" approach towards a "parameter" aproach, I would like to suggest to do the same for ValueMapValue defaults
      
      So instead of
      {code:java}
      @ValueMapValue
      @Default (values = "standardbuttonwhite")
      private String fieldName;
      

      it would be nice if

      @ValueMapValue(defaults = "standardbuttonwhite")
      private String fieldName;
      

      would be possible

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: