This list does not allow attachments.
On 06/03/2014 10:11 AM, walid yaich wrote:
Hi Devs,
I have a loop in which i add object to all documents under the space
"Main", it crashes in the middle of the loop ...
##get all document in the Main space
#set($docus = $xwiki.getSpaceDocsName("Main"))
#foreach($docu in $docus)
#set ($myDoc = $xwiki.getDocument("Main", $docu))
$myDoc.getFullName()
##Add object to the page
#set($obj = $myDoc.newObject("Revision.RevisionClass"))
$obj.set("approvedRev", $myDoc.getVersion())
## Save the object in the page
$myDoc.getDocument().setMetaDataDirty(false)
$myDoc.getDocument().setContentDirty(false)
$myDoc.save()
#end
Stack is attached
Please any method to catch the exception and let it go in Velocity
Thanks in advance :)
--
Sergiu Dumitriu
http://purl.org/net/sergiu