Hello, 

To customize our entreprise wiki, we have identified a few plugins / macros 
that we need to develop. I have checked the online xwiki documentation / 
tutorial, but i find them quite uncomplete, so here i am with my questions :) 


1) It is my understanding that, if my macro need some specific javascript (eg 
jquery.js) and css, i must use xwiki skin extension. While i can find easily 
how to create xwiki velocity code that use those extension, i found no 
explanation on how to do this in java from within "public List<Block> execute(T 
parameters, String content, MacroTransformationContext context)"? Where can i 
find example of embedding javascript/css inside a java macro jar or xar? 

2) Extensions are provided as xar, maven archetype for xwiki java macro 
generates a .jar. How do i generate a xar with maven so that in one archive i 
have both my macro, the css and the js? 

3) Most extension referenced on xwiki main site are open source, but where are 
the source? I can only find the compiled xar files on download 

4) Is there some recommanded way to pass complex parameters to macros? I need 
to create some dynamic menu that will get as parameter a list of node + links + 
icon to show + subnodes + for each subnodes icons / links + subsubnode etc. Is 
it good practice to just put some kind of json in the body of macro, something 
like 

{{mymenu width="200px"}} 
[ 
{ name: "node1", link: "MySpace.MyPage1", icon: "somelinktoanattachement"} , 
{ name: "node2", link: "MySpace.MyPage2", icon: "somelinktoanattachement"}, 
{ name: "node3", link: "MySpace.MyPage3", submenu: [ 
{ name: "node3.1", link: "MySpace.MyPage31", icon: "somelinktoanattachement"}, 
{ name: "node3.2", link: "MySpace.MyPage32", icon: "somelinktoanattachement"} 
] 
} 
] 

{{/mymenu}} 

And in this case, are there already some stock xwiki methode to transform json 
into objet array? 

Thank you, 

David Delbecq 

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to