Hi Eugen,
I think the default live table filtering is done on the database (see
LiveTableResultsMacros), i.e. by adding constraints to the query that
returns the data for the live table rows. If you want to filter custom
columns that are not taken from the database then you need to write a
custom filter.
Hope this helps,
Marius
On Wed, Nov 7, 2012 at 7:33 PM, Eugen Colesnicov <ecolesnicov(a)gmail.com> wrote:
Hello!
I diving deeper and deeper in a livetables ...
I created custom JSON page with this content:
{{include document="XWiki.LiveTableResultsMacros" /}}
{{velocity}}
#if("$!{request.xpage}" == 'plain')
$response.setContentType('application/json')
#end
#set($map = {})
#gridresult_buildJSON("$!request.classname"
$request.collist.split(',')
$map)
#foreach($row in $map.get('rows'))
#set($rowDoc = $xwiki.getDocument($row.get('doc_fullName')))
#set($parentDoc = $xwiki.getDocument($rowDoc.getParent()))
#set($discard = $row.put('pNo', "$foreach.count"))
#set($discard = $row.put('wDesc', " $parentDoc.getDisplayTitle()
<$parentDoc.getExternalURL()> "))
#end
$jsontool.serialize($map)
{{/velocity}}
As you can see, I added column with row number and column with link for the
parent page. JSON working, livetable showing, but I cannot filter by these
added columns ... any filter give empty result inside livetable.
Maybe I wrote something wrong ...
What need to do for normal working of filtering on a columns added by custom
json?
--
Thanks beforehand
Eugen Colesnicov
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Livetable-filtering-on-a-column-added-by-…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users