[xwiki-users] [XWiki] change the font size and color in a livetable
Hello I'm creating a Live Table with the normal macro and I would like to know if it is possible to change the font size and color of the text inside the table ? {{velocity}} #set($columns = [doc.name, doc.date]) #set($columnsProperties = { doc.name : {displayName : Name }, doc.date : {displayName : }, }) #set($options = { className:, selectedColumn : doc.date, defaultOrder : desc, rowCount: 10 }) #livetable(userdirectory $columns $columnsProperties $options) {{/velocity}} This is the code I use to create the livetable (of all documents of the XWiki), but I have no idea how to change the font size and color for the whole table, and I would also like to know if it was possible to change the font size and color for a specific column? Thanks for the advice !! Greetings Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] run document skript with admin rights
Hello ! on one wiki page I have a skript to delete a comment on another page. But when a user that has no edit right tries to do it, it fails. Is there a way to go around this and let the user delete the comment as if he had edit rights? for reference here is my simplified code {{groovy}} yourDocReference = new org.xwiki.model.reference.DocumentReference('xwiki','Main','WebHome'); yourDoc = xwiki.getDocument(yourDocReference); comment = yourDoc.getComments(); if(comment.isEmpty()){ println(No Comment to remove!);} else{ yourDoc.removeObject(comment[comment.size()-1]); yourDoc.save(); println(First comment removed !)} {{/groovy}} thanks for the help Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] command to delete a comment
Hello In a groovy macro I can access the comments on the page like this : comments = doc.getComments(); now I want to delete the last one... how can I do that? I tried : comments[0].delete(); but it doesn't work do you know what to type to make it work? Thanks a lot Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Error code too large
Hello ! I got a pretty long code for one of my page and I get this error : Caused by: javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during class generation: Method code too large! Is there any way to change the xwiki settings to avoid this error? thank you very much in advance for your help ! Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] object not transfered with include macro
Hello I'm using the include macro to transfer some information between the different documents of my xwiki, but somehow I can't transfer any class. When I try this code : First page : {{groovy}} xy=2; public class Souris { public String Name; public Souris(){ Name=Jerry; } } Souris Verte = new Souris(); {{/groovy}} Second page : {{include reference=First page/}} {{groovy}} println(xy); {{/groovy}} {{groovy}} println(Verte.Name) {{/groovy}} the first groovy macro runs well and displays 2 as predicted, but the second one doesn't work. Why ? And how can I make it work? Thanks for the advice ! Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] define a class for multiple documents
Hello, I have little question : I would like to define a class in a groovy macro in a document, create an instances of this class on another document and then access this instance on the first document. Is that possible to do? It would kinda look like this: First doc (Doc1): {{groovy}} public class Hello{ public printHello(){ println(HelloWorld!) } } Hello A = //get instance FirstTest of Hello from the doc2 A.printHello(); {{/groovy}} second doc (Doc2): {{groovy}} //import class definition from Doc1 Hello FirstTest = new Hello(); {{/groovy}} then the first document would output HelloWorld! Is that doable in any way?? Thanks in advance Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] access another document with groovy
Hello I have a little question and I couldn't find an answer on the internet... In a groovy part, I can create list the attachments of the current document with this : {{groovy}} list = doc.getAttachmentList(); print(list); {{/groovy}} how can I access the documents of another page in the same way? On a different page of the wiki I tried {{groovy}} list = XWiki.WebHome.getAttachmentList(); print(list); {{/groovy}} to get a list of the attachments on XWiki.WebHome, but it didn't work... Do you have any clue? Thank you very much ! Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] access another document with groovy
Date: Mon, 10 Nov 2014 16:23:33 +0100 From: thomas.morta...@xwiki.com To: users@xwiki.org Subject: Re: [xwiki-users] access another document with groovy def yourDocReference = new DocumentReference('xwiki', 'XWiki', 'WebHome') def yourDoc = xwiki.getDocument(yourDocReference) def list = yourDoc.getAttachmentList() I tied it on my xwiki and when I type : {{groovy}} def yourDocReference = new DocumentReference('xwiki','XWiki','WebHome'); def yourDoc = xwiki.getDocument(yourDocReference); list=yourDoc.getAttachmentList(); println(list); {{/groovy}} I get this error Caused by: javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1677.groovy: 1: unable to resolve class DocumentReference @ line 1, column 24. def yourDocReference = new DocumentReference('xwiki','XWiki','WebHome'); did I miss anything? ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] icons not displaying on Main.WebHome
Hello, I just installed XWiki on my computer to make a small Wiki for myself and I was unable to display icons on the page Main.WebHome Icons work fine on the other pages, but when I write [image.icon.accept] in the editor, the text icon.accept appears on the page instead of the icon Is that normal? Cheers Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Icons on main page
Thank you all for the quick answers :-) Sadly none of the proposed syntax work on my Main.WebHome page, but they all work on any other page of the wiki. Is there an option that I might have changed to get this result? Cheers Adrien ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users