Paul Bowler wrote:
I've got form binding working nicely for existing form documents in my XML database (thanks for all your help). However, this only works with data that alrady exists within the database. If I try to use it for a new form instance I get 'No cocoon form found' as there is no data from which to load into the form.

How can I create a new instance of the form data that can then be bound to the XML database (i.e. create a new XML document from a given form specification)?

The script I am using for editing documents is here:

function editxml(form) {
var form = new Form(cocoon.parameters["form-definition"]);
var bindingURI = cocoon.parameters["bindingURI"];
var dataURI = cocoon.parameters["dataURI"];
var dataURI = cocoon.parameters["formURI"];


var doc = loadDocument(dataURI);

var doc = loadDocument("cocoon://data-creation-pipeline"); and here we go :)


form.createBinding(bindingURI); form.load(doc); form.showForm(formURI); form.save(doc);

        saveDocument(doc, dataURI);
}

I think I need to replace the loadDocument() call but don't know what with.

Many thanks,

Paul.

--
Paul Bowler
Aventix Associates Ltd


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to