Following is example how you can connect Groovy with Velocity using session attributes. {groovy} session=context.getRequest().getSession(); session.setAttribute('key1', 'Ā123'); println(session.getAttribute('key1')); {/groovy} {velocity} #set($session=$xcontext.getRequest().getSession()) key1 $xcontext.getRequest().getSession().getAttribute('key1') {/velocity} Valdis
Thanks for response. I'm just starting to get to grips with xwiki, so sure I'm not necessarily going in the right direction. But I was wanting to generate some data with groovy (lets assume its query of an external database) and then display the results in livetable.
Tim
On 19/08/2013 07:33, Marius Dumitru Florea wrote:
The live table macro, http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro , is a Velocity macro so it's normal that you've seen only Velocity examples. It's also a very complex macro so rewriting it in Groovy is not worth the effort and I don't think it makes much sense. Why do you need to generate the live table from Groovy? Maybe there are workarounds.
Hope this helps, Marius
On Sat, Aug 17, 2013 at 5:26 PM, Tim Dudgeon <[email protected]> wrote:
Are there any examples of how to use livetable with groovy? The only examples I can find are for velocity. Thanks Tim _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users