Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16672

Cannot associate a label to the (default) empty value when using a Static List property

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.11.9
    • Fix Version/s: 11.7, 11.3.4, 10.11.10
    • Component/s: Old Core
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      When you add a Static List property to a class you can specify:

      • the list of allowed values
      • the default value

      Suppose you want to have the empty string as the default (allowed) value. You can't associate a label to it using the "values" meta property. If you try something like this:

      =No value|Left|Right
      

      you get an ArrayIndexOutOfBounds exception in StaticListClass because empty value is not expected in the "values" meta property.

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              mflorea Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: