Hi,
On 7 Feb 2014 at 13:41:08, Danilo Amaral de Oliveira ([email protected](mailto:[email protected])) wrote: > Hello People, > > I am trying to translate the script below from velocity to groovy, but I am > not getting success in the "map" variable translation, when I try to define > more than 1 value in variable I get error. I will need it because I am > passing information to a template email. > Velocity > #set($map= {'document':"$xwiki.getDocument()", > 'url':"xwiki.getDocument().getExternalURL()"}) > #set($discard = $xwiki.mailsender.sendMessageFromTemplate($defaultMail, > "$recipients", $xwiki.null, $xwiki.null, "pt_BR", > "PublicationWorkflow.MailTemplate : Refus de publication", $map)) > > My groovy > def map = xwiki.null Here’s how to define a map in Groovy: http://groovy.codehaus.org/JN1035-Maps Thanks -Vincent > def result = xwiki.mailsender.sendMessageFromTemplate("${sender}", > "[email protected]", emailcc, emailbcc, "pt_BR", "MailTemplate > : Aviso de Publicacao Topico", map) > > It will be part of a script to advice the wiki users that a topic was created > in their forum. > > Anyone can help? > > Thank you! > _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
