[ 
http://jira.xwiki.org/jira/browse/XWIKI-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_22007
 ] 

Ricardo Rodríguez commented on XWIKI-361:
-----------------------------------------

Working with XWiki 1.2.6932 in an Tomcat servlet container.

I've substituted groovy-all-1.0-jsr-06.jar with groovy-all-1.5.1.jar, restarted 
Tomcat and each() seems to work now.

http://xepecnet.environmentalchange.net/xwiki/bin/view/iCT/xwiki361

> The ".each()" instruction doesn't work
> --------------------------------------
>
>                 Key: XWIKI-361
>                 URL: http://jira.xwiki.org/jira/browse/XWIKI-361
>             Project: XWiki Platform
>          Issue Type: Bug
>          Components: Scripting - Groovy
>    Affects Versions: 0.9.1252
>            Reporter: Philippe Kernevez
>             Fix For: Future
>
>
> This script doesn't print anything in XWiki and work perfect in groovy
> {noformat}
> import java.util.Date
> class Measure{
>    def Measure(Date pDate, int pPercent) {
>       mDate = pDate
>       mPercent = pPercent
>    }
>    Date mDate
>    int mPercent
> }
> myMeasures = []
> myMeasures << new Measure(new Date(106, 10, 9), 23)
> myMeasures << new Measure(new Date(106, 10, 13), 23)
> myMeasures << new Measure(new Date(106, 10, 15), 23)
> myMeasures = myMeasures.sort{a,b -> a.mDate <=> b.mDate}
> myMeasures.each{laVar -> println ""+laVar.mDate+"|"+laVar.mPercent}
> {noformat}
> The "for( x in myMeasures)" syntaxe works for a workaround.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to