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

Live data list filter should display and filter by (translated) labels for static list properties



    • Improvement
    • Resolution: Fixed
    • Major
    • 13.10-rc-1
    • 12.10.5, 13.1
    • Live Data, REST
    • None
    • Unit, Integration
    • Unknown
    • N/A
    • Pull Request accepted


      The list filter in live data only displays the values, not the labels. See, e.g., /xwiki/bin/view/Help/Applications/Movies/?useLiveData=true - there, in the dropdown of the Movies filter, e.g., instead of the configured label "Sci-Fi", only "sf" is displayed. This also doesn't consider any translations. Note that LT displays the translated value if there is any or otherwise the label and only the value if there is neither a translation nor a label. LD should do the same. Further, LD allows filtering the values. Filtering is done in the client and by requesting values with the entered text as filter from the server as initially only 10 values are loaded. The filtering on the server side currently also only considers the values and not the (translated) labels. It is important to also consider the displayed label for filtering as the user most likely doesn't know the underlying value but only the displayed labels, which can be very different. The REST API uses ClassPropertyValuesResourceImpl as implementation, which gets the values from StaticListClassPropertyValuesProvider in this case.

      A possible solution is thus to change StaticListClassPropertyValuesProvider to put the translation or, if there is none, the label into the label property of the metadata which is already provided by implementations for other kinds of properties (like documents) and already displayed by LD. Further, the implementation could then also search in the provided label on the server side (the filtering also happens in StaticListClassPropertyValuesProvider).


        Issue Links



              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              0 Vote for this issue
              1 Start watching this issue