> 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 :)

Thanks, but this is not what I mean. This is a NEW instance of a form (i.e. a form 
that has no data yet) so there is 
nowhere to load the data from. I need to miss out the loadDocument() function 
altogether, but this means I don't have 
a 'document' object for the required saveDocument() function.

Can I create a 'document' from the forms validated 'model' object?

Thanks,

Paul.

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

Reply via email to