Try this:
#set($newObj = $doc.newObject("SpaceName.ClassName")) ## creates a new
object
#set($ok = $newObj.set("PropName", $propValue)) ## sets a property in the
new object
#set($ok = $doc.save()) ## save the document, and the new object
On Thu, Feb 18, 2010 at 8:33 PM, Valdis Vītoliņš <valdis.vitolins(a)odo.lv>wrote;wrote:
Following velocity allows to create simpe xwiki
document:
#set ($mydoc = $xwiki.getDocument("Sandbox.Test1"))
$mydoc.setContent("sdfsdf")
$mydoc.save()
But How can I create custom object?
http://hans.gerwitz.com/projects/snipsnap-to-xwiki
shows some ideas but I can't make it working for me.
Another (awkward) way would be executing external curl command.
How can I do this?
Thanks,
Valdis
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Flavius Olaru