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

List of Users property does not work with Livetable list filter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.1-milestone-2
    • 4.1.3
    • LiveTable
    • Solaris 12, Java 1.7.0_09, XE 4.1.3
    • Unit
    • Easy
    • N/A
    • N/A

    Description

      Along with the display issue noted in XWIKI-7897, if a livetable tries to use a list of users property on some class, with a filterable 'list' type, the option values in the generated html select are correct (i.e. "XWiki.<user>") but the displayed selections are all '$l10n_value'. I suspect this is because the livetable macro uses

                      #set($map = $class.get($colname).getMapValues())
                      #foreach($listitem in $list)
                        #set ($l10n_key = "${propClassName}_${colname}_${listitem}")
                        #set ($l10n_value = $msg.get($l10n_key))
                        #if ($l10n_value == $l10n_key)
                          #set ($l10n_value = $map.get($listitem).getValue())
                        #end
                      #end
      

      but the Users.java class simply returns a new HashMap,

      https://github.com/xwiki/xwiki-platform/blob/stable-4.1.x/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/UsersClass.java

      so $l10n_value is set to an empty value.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              cmp Chris Phelan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: