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

Extend DBListClass to accept value/label pairs queries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0 B2
    • Component/s: {Unused} Core
    • Labels:
      None
    • Similar issues:

      Description

      DBListClass uses a query to populate the displayed selectbox with values. It would be useful to be able populate not only the values, but also the displayed text for each value.

      For example, i have a colection of objects in the database, each object having an id and a displayed name. Populating the DBListClass with ids enforces the user to lookup/remember ids, and this should be avoided. Populating it with names negates the role of the id.

      There are 2 variants for this:

      • add a new field in the Meta class, has_labels
      • detect if the resultset is composed of single values or pairs

      Please advise.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              sdumitriu Sergiu Dumitriu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: