I’m making a live editor that would allow me to edit and add objects to a document, and then use the list in other documents. I would like to make these documents more like database tables with rows in them that will be XObjects attached to the document.
So far I got this:
For editing of properties, I looked at the editableProperty.js code and managed to edit the properties of existing objects successfully.
In Velocity I can do:
## Create an object #set($obj = $doc.newObject("XWiki.SomeClass")) $obj.set("field1",$value1) $obj.set("field2",$value2) ## Save the object in the page $doc.save()
As shown in the Scripting API Guide, but I don’t understand how to do this when the button is pressed.