[xwiki-users] Livetable
Hi, I created new data type (class, sheet, template document) and I created several documents of this type. Then I created document with livetable macro to list documents in table format. All is working well, but first row in table is template document. How can I filter template document from table? Any help appreciated Regards Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4744002.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello Frantisek, What version of XWiki are you using ? Also, what is the exact name of your template document ? In at least recent (2.1+) versions of XWiki, the JSON sources filters on document with name ${className}Template ; so if your class is MySpace.MyClass, then MySpace.MyClassTemplate should not appear in livetable results. See http://svn.xwiki.org/svnroot/xwiki/enterprise/trunk/wiki/src/main/resources/... : #if("$!className" != "") #set(${...Sql = ", [snip] and doc.fullName <> '${className}Template' [snip]") ... Hope this helps, Regards, Jerome.
Hi,
I created new data type (class, sheet, template document) and I created several documents of this type. Then I created document with livetable macro to list documents in table format. All is working well, but first row in table is template document. How can I filter template document from table?
Any help appreciated
Regards
Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4744002.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello Jerome, thanks for answer. Now we have 2.2.M1 version running. The name of class is XWiki.SLMClass and template name is XWiki.SLMTemplate. We will upgrade to 2.2.2 soon, then I will try livetable again and I will write you if problem persist. Regards Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4755405.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello Jerome We upgraded XWiki to version 2.2.2. I didn't change anything but now I have opposite problem, no one document is in livetable. I have "TestClass" in "TestSpace", template is "TestTemplate" in TestSpace. Class properties for TestClass ID (ID: Number) Servis Name (Name: String) Servis Description (Description: TextArea) Servis Manager (Manager: Static List) Script for livetable: {{velocity}} #set($columns = ["ID", "Name", "Description", "Manager"]) #set($columnsProperties = { "ID" : { "type" : "number" }, "Name" : { "type" : "text"}, "Description" : { "type" : "text" }, "Manager" : { "type" : "list"} }) #set($options = { "className":"TestSpace.TestClass", "rowCount": 15 }) #livetable("Catalog" $columns $columnsProperties $options) {{/velocity}} I created two TestClass type documents in TestSpace (I can see them in TestSpace.TestClass page), but page with livetable script has only header row. Same script in 2.1.M1 version created table with header + rows with documents and Template document too. Any idea what I do wrong? Regards Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4756208.html Sent from the XWiki- Users mailing list archive at Nabble.com.
There is an issue in 2.2 when sorting on a non-string property (see http://jira.xwiki.org/jira/browse/XWIKI-4973). As you don't specify a sort column, I think it sorts on first column wich is a Number, and so livetable is empty ... Waiting for 2.2.3 release, you can try this workaround : add "class":"TestSpace.TestClass" for each column in $columnsProperties Hope this helps, Jeremie 2010/3/18 Frantisek Kall <[email protected]>
Hello Jerome
We upgraded XWiki to version 2.2.2. I didn't change anything but now I have opposite problem, no one document is in livetable.
I have "TestClass" in "TestSpace", template is "TestTemplate" in TestSpace.
Class properties for TestClass ID (ID: Number) Servis Name (Name: String) Servis Description (Description: TextArea) Servis Manager (Manager: Static List)
Script for livetable:
{{velocity}} #set($columns = ["ID", "Name", "Description", "Manager"]) #set($columnsProperties = { "ID" : { "type" : "number" }, "Name" : { "type" : "text"}, "Description" : { "type" : "text" }, "Manager" : { "type" : "list"} }) #set($options = { "className":"TestSpace.TestClass", "rowCount": 15 }) #livetable("Catalog" $columns $columnsProperties $options) {{/velocity}}
I created two TestClass type documents in TestSpace (I can see them in TestSpace.TestClass page), but page with livetable script has only header row. Same script in 2.1.M1 version created table with header + rows with documents and Template document too.
Any idea what I do wrong?
Regards
Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4756208.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello Jeremie Thanks for help. I tried you advice me, but it still doesn't work. Livetable is always empty. I also noticed that livetable used in "Document Index (Xwiki.Tableview)" is also empty. It looks as some 2.2.2 version problem (or xwiki setting in our wiki). I also tested some XWIKI ENTERPRISE 2.2.2.27483 versions (I searched them on internet by Google) I found that some has same problem (http://aswjrevesby.org/xwiki/bin/view/Main/AllDocs?view=index) - document index livetable is empty, but other (http://www.imanquest.org/xwiki/bin/view/XWiki/Tableview) are OK. Can anybody confirm that? Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4758945.html Sent from the XWiki- Users mailing list archive at Nabble.com.
On 03/18/2010 08:57 PM, Frantisek Kall wrote:
Hello Jeremie
Thanks for help. I tried you advice me, but it still doesn't work. Livetable is always empty. I also noticed that livetable used in "Document Index (Xwiki.Tableview)" is also empty. It looks as some 2.2.2 version problem (or xwiki setting in our wiki).
I also tested some XWIKI ENTERPRISE 2.2.2.27483 versions (I searched them on internet by Google) I found that some has same problem (http://aswjrevesby.org/xwiki/bin/view/Main/AllDocs?view=index) - document index livetable is empty, but other (http://www.imanquest.org/xwiki/bin/view/XWiki/Tableview) are OK.
Can anybody confirm that?
Could you try the new 2.2.3 version and see if it works here? Don't forget to import the new livetable documents, most importantly XWiki.LiveTableResultsMacros -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi, I had the same problem (index page empty after upgrade) several days ago. The upgrade was from XWiki Enterprise 2.1.2 to 2.2.2. It turned out that we forgot to upgrade the system documents in addition to war upgrade. So in my case re-importing pages from xwiki-enterprise-wiki-2.2.2.xar file solved the problem. Some useful links: * http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradingw... Upgrading XWiki Documents * http://www.xwiki.org/xwiki/bin/view/Main/Download Download page where you can find corresponding *.xar file (I believe you'd have to upgrade to v2.2.3 now) Hope this helps. Regards, Roman -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4783834.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Roman, hi Sergiu thanks for your help. As Roman wrote, our problem was with system documents. First we upgraded from 2.1.M1 to 2.2.2 (we upgraded only core, not documents from default xar) - livetable didn't work well, index page was empty, also page with livetable for "TestClass" was empty. Then we upgraded from 2.2.2 to 2.2.3 - same result. Then I imported documents from default xar for version 2.2.3 (I imported all documents but - XWiki.XWikiPreferences, XWiki.WebPreferences, XWiki.XWikiAllGroup, XWiki.XWikiAdminGroup) Problem with empty index page was solved. Index page work well, but with livetable for "TestClass" I had same problem I have had before. There was still row for template document in livetable. Class name is "TestClass", template is "TestTemplate" (it is default name for template). When you are creating class with name Test suffix Class is added, but not for template. Filter in LiveTableResultsMacros is ... doc.fullName<>'${className}Template ... When I renamed "TestTemplate" to "TestClassTemplate" livetable started work well, template document in livetable for TestClass is filtered. I assume it is an issue, should I raise Jira issue for it? Also if there is a column for TextArea type property in a livetable, table is empty, but maybe it is a feature not issue. Regards, Frantisek -- View this message in context: http://n2.nabble.com/Livetable-tp4744002p4791154.html Sent from the XWiki- Users mailing list archive at Nabble.com.
On 03/24/2010 03:07 PM, Frantisek Kall wrote:
Hi Roman, hi Sergiu
thanks for your help.
As Roman wrote, our problem was with system documents. First we upgraded from 2.1.M1 to 2.2.2 (we upgraded only core, not documents from default xar) - livetable didn't work well, index page was empty, also page with livetable for "TestClass" was empty. Then we upgraded from 2.2.2 to 2.2.3 - same result. Then I imported documents from default xar for version 2.2.3 (I imported all documents but - XWiki.XWikiPreferences, XWiki.WebPreferences, XWiki.XWikiAllGroup, XWiki.XWikiAdminGroup)
You should take care of XWiki.Admin, since you imported it (change the password).
Problem with empty index page was solved. Index page work well, but with livetable for "TestClass" I had same problem I have had before. There was still row for template document in livetable.
Class name is "TestClass", template is "TestTemplate" (it is default name for template). When you are creating class with name Test suffix Class is added, but not for template.
Filter in LiveTableResultsMacros is ... doc.fullName<>'${className}Template ...
When I renamed "TestTemplate" to "TestClassTemplate" livetable started work well, template document in livetable for TestClass is filtered.
I assume it is an issue, should I raise Jira issue for it?
Yes, please.
Also if there is a column for TextArea type property in a livetable, table is empty, but maybe it is a feature not issue.
This should have been fixed... -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (5)
-
coldserenity -
Frantisek Kall -
Jeremie BOUSQUET -
Jerome Velociter -
Sergiu Dumitriu