On 09/24/2014 10:15 AM, Pascal BASTIEN wrote:
> Hello,
> 
> (freely inspired/adapted by: 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Test+Mail (Vincent) and 
> http://xwiki.markmail.org/message/bksyjlpwezx4dgco?q=getAllMembersNamesForGroup+velocity
>  (Sergiu)
> 
> Some questions:
> to replace some text in velocity, I used $text.replaceAll(xxx,yyy).
> Are they a way to use StringUtils tools in velocity?
> http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/StringUtils.html
> If yes, how?

Yes, $stringtool

> I failed to get email adress with $userdoc.display("email","view",$user) 
> function but without "mailto:"; prefix ...
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Document.html#display%28java.lang.String,%20java.lang.String,%20com.xpn.xwiki.api.Object,%20java.lang.String%29

Use $user.getProperty('email').value to access the raw value, display
methods generate HTML code.

> Are they a tip with wrappingSyntaxId value? or I must use regexp like i did?
> 
> If there are too much email I don't know if my macro is safe... (Perhaps 
> there are a way to insert a sleep instruction in velocity?)
> 
> Thxs
> 

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to