LiveTable JSON example




I’m trying to fill out Livetable based on JSON data.
The property Custom Dispaly contains the following script:

#set($columns = ["first_name", "last_name", "editor"])
#set($columnsProperties = {
   "first_name" : { "type" : "text" , "size" : 20, "link" : "view"},
   "last_name" : { "type" : "text" , "size" : 20, "link" : "view"},
   "editor" : { "type" : "list", "class": "XWiki.XWikiUsers"}
#set($options = {
  "translationPrefix" : "",
  "rowCount": 10
#livetable("organization_directory" $columns $columnsProperties $options)

TestJSON page located at Test space and contains the script:

{{include reference="XWiki.LiveTableResultsMacros" /}}

{{velocity wiki="false"}}
#gridresultwithfilter("XWiki.XWikiUsers" $request.collist.split(",") "" " and<>'OrganizationSheet' and<>'OrganizationTemplate'")

When I open the page, I only see the filled-in list of the filter in the editor field:

How do I get a list of users?

Thanks for the help.




What would I like to do:

  1. Generate a dataset for LiveTable based on a complex HQL query for multiple classes.
  2. Display data in LiveTable.

I can write queries and build tables based on classes:
#set ($ options = {
‘className’: ‘Space.Class’
But can not combine 1 and 2.

I will be grateful for a simple step-by-step example.

Thank you for your attention.


Based on

  1. %D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F
  2. %D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F
  3. %D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F
  4. %D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F
  5. %D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F

Where is mistake?



hi, is your Organization.Code.OrganizationClass page a terminal page? If not you need to suffix it with .WebHome.


I think, yes:


What about Organization.ListOrganizationJSON? (is it terminal too?)


Bingo!!! :slight_smile:
Changed it to “Terminated” and see expected list!


Please, also update documentation.
Once again, a huge thank you :sunny: )


I could do that but it would be even more awesome if you could contribute to the doc! :slight_smile: It’s a wiki, you just need to register and edit away! Thx


Ok, done :wink:


Thanks @Rostyslav_Fitsyk. Actually I’ve modified it a bit to move it upwards since this comments is valid for all examples. See