Hi Glenn,

The solution is to use a Javascript Extension (JSX).
See http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial

Then you put the $jsx.use in your java macro.

In the near future (2.0M1), you'll be able to write XWiki 2.0 syntax  
macros in wiki pages so it'll be more easy to write very UI-oriented  
macros.

Of course you can also write your macro as a Velocity macro right now  
in a Wiki page and attach the JXS object to that page.

-Vincent

On May 14, 2009, at 5:31 PM, <[email protected]> <[email protected] 
 > wrote:

> I have a java macro that requires the page to include an external js  
> (e.g. jQuery) that works best if included in the head section of the  
> document.  Is there a way for a macro to trigger inclusion of  
> resources like this to be included in the page header?   In  
> confluence this was done by having a #requireResource statement in a  
> velocity template included by the macro.
>
>
>
> How can this be done in xwiki?
>
>

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

Reply via email to