ClassOne with data and ClassTwo with data. ClassTwo has a multiple select database list consisting of ClassOne ID’s.
Our Classes have generated ID’s that correspond with their page ID’s. (idString)
So ClassTwo.usesClassOneRecords can contain ID1, ID2, ID4
I want to populate a livetable of ClassOne where ID in ClassTwo.usesClassOneRecords. (ID1,ID2,ID4)
I got $searchVar filled with the right ID’s and want to pass them to the livetable.
I used “extraParams” : “&idString=$searchVar” and “extraParams” : “&idString in $searchVar”
But both do not work. Is there a way to get this working as if it was a select * from ClassOne where idString IN ($searchvar)
I have a variable I want to pass to the query in the JSON, how do you do this?
How do I see if the livetable actually gets the JSON. If I test the JSON with the variable set in the velocity code, I get a JSON file. But I do not get the results in the livetable
How do I see if the livetable actually gets the JSON. If I test the JSON with the variable set in the velocity code, I get a JSON file. But I do not get the results in the livetable
You can follow it using Network tab by selecting the request to you page that contains the JSON. There you will see what exactly is the result. Also, if there are other results beside the json (if you put something for debug purposes), the livetable will just be empty.
I used the example code, modified it a bit, to get the right data.
What I see is a request with a /bin/get/JSON. It gives an empty page. The same request with /bin/view/JSON gives the JSON (with the XWIKI format of pages).
Maybe your page is actually called “JSON.WebHome” and you didn’t added it correctly in the resultPage attribute? In view mode is not necessarily to add it to the url.
Also, you could check to output the json only on a get request #if ($xcontext.action == 'get') .. #end .
The problem that you have with ‘/’ I suspect is, as I wrote in the previous message, because your page is actually called GeneriekeKlassen.RapJSON.WebHome. Update this in your resultPage and see if you get the results in the Network tab.
To see if I fully understand. You have used the url option for your custom json page, with an extra doc_url parameter send and everything looks ok.
Now you want to add in your columns an _actions like one, that will link to the edit page of the doc_url? Or you just want to have the _actions column using your custom json page?