Hi Radek,
Glad I could help.
On 1/8/10 3:13 AM, Radek Rekas wrote:
Thanks, using firebug to take a look at the reponse of the JSON page helped
me to diagnose what the problem was.
The following blog post helped me with figuring out how to access the JSON
used by the livetable:
http://www.softwareishard.com/blog/firebug/json-explorer-for-firebug/
In case anyone else comes accross wondering how to do this it would appear
that all of the class properties are stored in seperate tables and the query
parameter in the gridresultwithfilter macro is used to filter on these
tables. For my example I needed to use the StringProperty table as the title
property was set to type string in my xwiki class. Integers appear to go in
the IntegerProperty table and so on.
My example was the below where title was the field name in the xwiki class
that I was trying to filter on and test6 was the field value.
#gridresultwithfilter($request.classname $request.collist.split(,) ,
StringProperty as stringtable, and obj.id=stringtable.id.id and
stringtable.id.name='title' and stringtable.value='test6')
Thanks again for pointing me in the right direction.
Radek Rekas
- Original Message -
From: oana.tabaranuoana.tabar...@xwiki.com
Sent: Thu, 7/1/2010 11:22pm
To: XWiki Usersusers@xwiki.org
Subject: Re: [xwiki-users] Livetable filtering format
Hi Radek,
When writing custom code for the live table, I suggest you copy the
content from XWiki.LiveTableResultsMacros and paste it into your own
wiki page. Create a small example for the livetable that uses your wiki
page and debug the query and JSON generated by the macro using Firebug
or the direct URL in your browser.
This also might help:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/LiveTable
Oana
On 07.01.2010 06:04, Radek Rekas wrote:
Hi,
I'm trying to get livetable filtering working however I'm having trouble
figuring out what objects/properties are available in the $filterfrom and
$filterwhere parameters of the gridresultwithmacro() macro contained in the
XWiki.LiveTableResultsMacros document.
I'm trying to filter the livetable to display only records where the title
field is set to test but setting the $filterwhere parameter to and
obj.name='title' and obj.value='test' does not seem to work and I'm having
trouble finding any documentation etc to find out what format these where
clauses should be in.
The closest documentation that ive been able to find is at the bottom of the
following page
http://dev.xwiki.org/xwiki/bin/view/Drafts/XWikiGridComponentTutorial
however it doesnt give much clues as to what format the $filterwhere and
$filterfrom parameters (3rd and 4th parameter) of the gridresultwithmacro()
macro should be in.
The livetable displays all records correctly if I leave the $filterfrom and
$filterwhere parameters blank.
Can anyone offer any hints or point me to any relevant documentation?
Thanks,
Radek Rekas
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Oana Tabaranu
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users