From: Esbach, Brandon [mailto:Esbachb@tycoelectronics.com]
Sent: lundi 4 septembre 2006 10:24
To: xwiki-users@objectweb.org
Subject: RE: [xwiki-users] "Clone" another documents objects when creating a new documentAttachments don't seem to copy with this method - I get a wrapped exception error:The size of the attachment is around 20k.Comments are fine, as are other objects (at least the one's I've tried).
From: Esbach, Brandon [mailto:Esbachb@tycoelectronics.com]
Sent: 01 September 2006 10:31
To: xwiki-users@objectweb.org
Subject: RE: [xwiki-users] "Clone" another documents objects when creating a new documentThat seems to do it perfectly, thanks!
From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemalto.com]
Sent: 01 September 2006 09:45
To: xwiki-users@objectweb.org
Subject: RE: [xwiki-users] "Clone" another documents objects when creating a new documentHello,I believe you can use the copyDocument() method. I use it to rename pages, I copy a document to a newly named document, then delete the old one.All objects and attachments are also copied in the process, so that may interest you (as far as all objects are included in the template document I believe)$xwiki.copyDocument($sourceDoc, $targetDoc)
Jeremie, Bousquet
GSE Solution CMO
Gemalto
Tel: +33 4 42 36 42 93
Avenue du Jujubier, Z.I Athelia IV
13705 La Ciotat, FRANCE
Jeremie.Bousquet@gemalto.com
www.gemalto.com
From: Esbach, Brandon [mailto:Esbachb@tycoelectronics.com]
Sent: vendredi 25 août 2006 12:58
To: xwiki-users@objectweb.org
Subject: [xwiki-users] "Clone" another documents objects when creating a new documentHi All,
Is there any way to clone all objects in an existing document to a different document with one server request?
So that a template document can be maintained with default object values; and can be brought in painlessly to a new document.
Brandon Esbach
Software Engineer
M/A-Com Eurotec Operations
LoughMahon Technology Park,
Skehard Road,
Blackrock,
Cork, Ireland
Tel +353 21 4808305