Description
This script doesn't print anything in XWiki and work perfect in groovy
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}
The "for( x in myMeasures)" syntaxe works for a workaround.
Attachments
Issue Links
- depends on
-
XWIKI-1313 Update Groovy version used to 1.6-beta-2
- Closed
- is related to
-
XWIKI-2797 Create groovy macro for rendering 2.0
- Closed