I have a custom groovy script at DemoSpace.StudiesJSON that generates JSON of the form:
{
"totalrows": 5,
"matchingtags": {},
"tags" : [],
"offset": 1,
"reqNo": 0,
"returnedrows": 1,
"rows":
[{"doc_viewable":true,"study_id":3,"study_name":"My
Study","description":"A test study"}]
}
This is then called from a LiveTable macro as
{{velocity}}
#set($columns = ["study_name", "description", "study_id"])
#set($options = {
"resultPage":"DemoSpace.StudiesJSON"
})
#set($columnsProperties = {
"study_name" : { "type" : "text", "displayName":
"Study Name", "filterable": false },
"description" : { "type" : "text",
"displayName": "Description", "filterable": false },
"study_id" : { "type" : "text", "displayName":
"Study ID", "filterable": false }
})
#livetable("studyTable" $columns $columnsProperties $options)
{{/velocity}}
What I'd really like is to put links into each row, for instance replacing each entry
in the first ("Study Name") column with a link of the form
[[${study_name}>>StudyDetails?study_id=${study_id}]]. Is there a way to do this?
I've tried generating a link in the JSON but the query strings seem to get corrupted
and the link is lost in any case within the actual LiveTable.
Thanks,
Bryn