LiveData custom source development

liveTable and inline source are having issues like liveTable duplicates the first comment of all pages in a space and inline source does not support pagination, when trying in a comment tracker page.
To mitigate these issues its required to write custom source for liveData, can anyone help on this?

What I tried is: Written a custom source implementing LiveDataSource Interface, but it seems its not getting called.

Error: HTTP ERROR 500 javax.servlet.ServletException: java.lang.NullPointerException: Cannot invoke “org.xwiki.livedata.LiveDataMeta.getLayouts()” because the return value of “org.xwiki.livedata.LiveDataConfiguration.getMeta()” is null
URI: http://localhost:8080/xwiki/rest/liveData/sources/custom-comment-source/entries?offset=0&limit=10
STATUS: 500
MESSAGE: javax.servlet.ServletException: java.lang.NullPointerException: Cannot invoke “org.xwiki.livedata.LiveDataMeta.getLayouts()” because the return value of “org.xwiki.livedata.LiveDataConfiguration.getMeta()” is null

Any help will be appreciated.

1 Like
{{liveData id=“adminDataGroovy” properties=“id,name,level,parentId” source=“liveTable” sourceParameters=“resultPage=xwiki:f.WebHome&translationPrefix=admin.livetable.” layouts=“table” showPageSizeDropdown=“true” pageSizes=“5,10,20” sort=“id:asc” limit=“15”}}
{
“meta”: {
“propertyDescriptors”: \[
{
“id”: “id”,
“name”: “政区编码”,
“description”: “政区编码”,
“sortable”: true,
“filterable”: false
},
{
“id”: “name”,
“name”: “政区名字”,
“description”: “政区名字”,
“sortable”: true,
“filterable”: true
},
{
“id”: “level”,
“name”: “政区等级”,
“description”: “政区等级”,
“sortable”: true,
“filterable”: false
},
{
“id”: “parentId”,
“name”: “父级编码”,
“description”: “父级编码”,
“sortable”: true,
“filterable”: false
}
\]
}
}}
{{/liveData}}