One of the use cases I have for my wiki is storing 'issues', where each issue should have a serial number consisting of year + subsequent number.
I was thinking about a script like this, but one of the problems is: there is no 'while' function in Velocity. How would you create a form for this? Thanks for your ideas! Joris #set($space="Issues"} #set($template="AppSpace.IssueTemplate") #set($parent=$space.WebHome) #set($year= ${xwiki.formatDate($datetool.date, 'yyyy')}) #set($partID="0" #set($genericID=$space"."$year) #while($xwiki.exists($space.$issueID'') { #set($partID=$partID+1) #set($issueID=$year"-"$partID) } #if(!$xwiki.exists($issueID) && $xwiki.hasAccessLevel('edit', $context.user, $issueID)) $response.sendRedirect($xwiki.getURL($ID, 'inline', "template=$template}&parent=$parent")) ## Stop processing, since we already sent a redirect. #stop #end _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users