I start off answering first question On Tue, Jan 11, 2011 at 12:16 PM, Piotr Dziubecki <[email protected]>wrote:
Hi All,
I was playing with the faq tutorial and created my application based on that article. Now I have several questions regarding that example:
1. Is it possible to exclude a certain object from displaying in the livetable, I mean how to achieve something like that:
#set($sql = ", BaseObject as obj where obj.name = doc.fullName and obj.className = 'FAQ.FAQClass' and obj.name <> 'FAQ.FAQTemplate'")
I don't want to have an empty template object listed in my table.
in the $options variable you have to include "resultPage":"IPR.IPREntryClassJSON", where "IPR.IPREntryClassJSON is a page containing (in wiki 2.0 syntax) {{include document="XWiki.LiveTableResultsMacros" /}} {{velocity}} #gridresultwithfilter("IPR.IPREntryClass" $request.collist.split(",") "" " and doc.name<>'IPREntryClassSheet' and doc.name<>'IPREntryClassTemplate'") {{/velocity}}
2. I've created a template with several text areas and one static list. Then I tried to create a livetable out of this and when I choose to create a columns with the properties from text areas ( i.e. wykonawcy ) nothing is listed. Everything is fine in case of using only the static list (dzial_pcss) property:
{{velocity}} #set($columns = ["dzial_pcss", "doc.creationDate", "_actions"]) #set($columnsProperties = { "dzial_pcss" : { "displayName" : "DziaĆ PCSS" }, "_actions" : {"actions": ["edit","delete"]} }) #set($options = { "className":"IPR.IPREntryClass", "rowCount": 10 }) #livetable("userdirectory" $columns $columnsProperties $options) {{/velocity}}
http://apps.man.poznan.pl/iprxwiki/bin/view/Sandbox/TestPage1
{{velocity}} #set($columns = ["wykonawcy", "doc.creationDate", "_actions"]) #set($columnsProperties = { "wykonawcy" : { "displayName" : "Wykonawcy" }, "_actions" : {"actions": ["edit","delete"]} }) #set($options = { "className":"IPR.IPREntryClass", "rowCount": 10 }) #livetable("userdirectory1" $columns $columnsProperties $options) {{/velocity}}
http://apps.man.poznan.pl/iprxwiki/bin/view/Sandbox/TestPage2
Here is the definition of my template class: http://apps.man.poznan.pl/iprxwiki/bin/view/IPR/IPREntryClass
3. How to use the translationPrefix properly - is it for getting the pretty names for the headers - I'm confused about that. Is the only way of setting the header names to use the "displayName" prop for the columnsProperties ?
4. I have also tried the custom code both for creating new entries and displaying object with the use of sql queries. Is it possible to create something similar to the _actions column we can use in the livetable, but directly in the velocity code ( I mean how to access to the 'edit' 'delete' links ).
Thanks in advance :)
Regards, Piotr
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Vito Impagliazzo --- Please consider the environment before printing this email.