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

Live table sort does not work for anything else than StringProperty fields

    XMLWordPrintable

Details

    • livetable
    • Unknown

    Description

      It seems that when sorting a livetable on a field that is not a StringProperty type, the livetable is emptied. Removing the sort, or sorting on another column of type StringProperty, make the livetable display correctly.

      Extract from the mailing-list (from me) :

      "I did investigate a little, and in my understanding the sort query generated by XWiki.LiveTableResultsMacros is broken when type of field is not text (StringProperty).
      It seems to me that the macro in this case do not properly retrieve the field type, and so puts the default, StringProperty. Of course the query returns no answer, and your livetable is empty.

      In my case I corrected it in a very ugly way, for my particular use-case on Dates properties. I did not find, though, exactly why the macro do not find the correct type, but I think it might be linked to how the resultsmacros page is called (with parameters like "TargetDate_class=${propClassName}"), in this case it would more be a bug in the #livetable macro or in the javascript."

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              jbousque Jeremie BOUSQUET
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: