Hi Gerritjan,

Ludovic did that script not me I have to say!

Did you test the same code on another version of XWiki ? If so what is the
behaviour and the version ?
Can you generate the livetable based on another class, say XWiki.XWikiUsers,
what is the result ?

Hope this helps,
--
Thibaut

On Tue, Oct 19, 2010 at 7:48 PM, Gerritjan Koekkoek <
[email protected]> wrote:

> Hi Thibaut,
> The script works like magic, very nice.
> Copy and Paste from the link created some formatting challenges, but after
> fixing the script generated actually created a live table;
> BUT...
> Still there are no records displayed? Like with the script I put in this
> question.
> The pages where the objects are stored are in a space that has access
> forbidden for unregistered users?
> Off course I run the generated script as a registered user (actually as a
> admin user
> I'm running this on xwiki 2.5
>
> Gerritjan
>
> Op 18 okt 2010, om 23:11 heeft Thibaut Camberlin het volgende geschreven:
>
> Hi Gerritjan,
>
> You can use the livetable generator code snippet
> http://code.xwiki.org/xwiki/bin/view/Snippets/LivetableGeneratorSnippet
>
> Hope this helps,
> --
> Thibaut
>
>
> On Sun, Oct 17, 2010 at 2:23 PM, Gerritjan Koekkoek <
> [email protected]> wrote:
>
> > Hi,
> >
> > i'm trying to use LiveTable to improve our user experience.
> > This is my code:
> >
> > #set($collist = ["name", "email" , "subject", "status", "question",
> > "answer", "generalize"])
> >
> > #set($colprops = {
> > "name" : { "type" : "text", "size" : 20, " link" : "view"},
> > "email" :{ "type" : "text", "size" : 20, " link" : "view"},
> > "subject" :{ "type" : "text", "size" : 20, "link" : "none"},
> > "status" :{ "type" : "text", "size" : 20, "link" : "none"},
> > "question" :{ "type" : "text", "size" : 20, "link" : "none", "html" :
> > "true", "sortable":false },
> > "answer" :{ "type" : "text", "size" : 20, "link" : "none", "html" :
> > "true", "sortable":false },
> > "generalize" : { "type" : "list", "class":
> > "CdlsatdCode.CdLS_ATD_UserQuestionsClass"}
> >                })
> >
> > #set($options = {
> > "className":"CdlsatdCode.CdLS_ATD_UserQuestionsClass",
> > "rowCount": 15 })
> > <p/>
> > #livetable("myLTQuestions" $collist $colprops $options)
> >
> > It does show the table, but without any rows!
> > The last column does recognize the List box as defined in the Class,
> > because when I click it it shows the list of values defined in the class
> >
> > If I use a jsonQuery as in the example below, I get two records as
> defined
> > in the filter.
> > I tried to replace the above options value className with resultPage
> > pointing to page containing the jsonQuery below... but with the same
> result,
> > no rows returned
> >
> > ===
> > {{include document="XWiki.LiveTableResultsMacros" /}}
> > {{velocity}}
> > #gridresultwithfilter("CdlsatdCode.CdLS_ATD_UserQuestionsClass"
> > $request.collist.split(",") "" " and doc.creator='$context.user'")
> > {{/velocity}}
> >
> > the page I get shows me:
> > {
> > "totalrows": 2,
> > "matchingtags": {
> > },
> > "tags" : [
> > ],
> > "returnedrows":  0 ,
> > "offset": 1,
> > "reqNo": $request.reqNo,
> > "rows": [
> > {
> > "doc_viewable" : true,
> > "doc_name" : "GerritjanKoekkoek_doc261",
> > "doc_fullname" : "xwiki:CdlsatdPrivate.GerritjanKoekkoek_doc261",
> > "doc_space" : "CdlsatdPrivate",
> > "doc_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/GerritjanKoekkoek_doc261",
> > "doc_space_url" :
> > "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/",
> > "doc_hasadmin"  : true,
> > "doc_edit_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/inline\/CdlsatdPrivate\/GerritjanKoekkoek_doc261",
> > "doc_copy_url"   :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/XWiki\/CopyDocument?sourcedoc=xwiki%3ACdlsatdPrivate.GerritjanKoekkoek_doc261",
> > "doc_delete_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/delete\/CdlsatdPrivate\/GerritjanKoekkoek_doc261",
> > "doc_rename_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/GerritjanKoekkoek_doc261?xpage=rename&step=1",
> > "doc_rights_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/edit\/CdlsatdPrivate\/GerritjanKoekkoek_doc261?editor=rights",
> > "doc_author_url" :
> > "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/XWiki\/GerritjanKoekkoek",
> > "doc_date" : "2009\/07\/18 16:44",
> > "doc_title" : "GerritjanKoekkoek_doc261",
> > "doc_author" : "Gerritjan Koekkoek",
> > "doc_creationDate" : "2009\/07\/17 22:08",
> > "doc_creator" : "Gerritjan Koekkoek"
> > }
> > , {
> > "doc_viewable" : true,
> > "doc_name" : "GerritjanKoekkoek_doc264",
> > "doc_fullname" : "xwiki:CdlsatdPrivate.GerritjanKoekkoek_doc264",
> > "doc_space" : "CdlsatdPrivate",
> > "doc_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/GerritjanKoekkoek_doc264",
> > "doc_space_url" :
> > "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/",
> > "doc_hasadmin"  : true,
> > "doc_edit_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/inline\/CdlsatdPrivate\/GerritjanKoekkoek_doc264",
> > "doc_copy_url"   :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/XWiki\/CopyDocument?sourcedoc=xwiki%3ACdlsatdPrivate.GerritjanKoekkoek_doc264",
> > "doc_delete_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/delete\/CdlsatdPrivate\/GerritjanKoekkoek_doc264",
> > "doc_rename_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/CdlsatdPrivate\/GerritjanKoekkoek_doc264?xpage=rename&step=1",
> > "doc_rights_url" :
> >
> "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/edit\/CdlsatdPrivate\/GerritjanKoekkoek_doc264?editor=rights",
> > "doc_author_url" :
> > "\/xwiki%2Denterprise%2Dweb%2D2.5\/bin\/view\/XWiki\/GerritjanKoekkoek",
> > "doc_date" : "2009\/07\/20 14:22",
> > "doc_title" : "GerritjanKoekkoek_doc264",
> > "doc_author" : "Gerritjan Koekkoek",
> > "doc_creationDate" : "2009\/07\/20 13:58",
> > "doc_creator" : "Gerritjan Koekkoek"
> > }
> > ]}
> >
> > _______________________________________________
> > users mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to