Paul
I am not sure what you mean by the "forms validated 'model'";
surely its the form's *data* that gets validated by the model?
And why can you not just use the:
cocoon://data-creation-pipeline
to create a new, blank form - think of it as a
cocoon://blank-form-creation-pipeline
if that makes more sense?
Sorry if I am misunderstanding completely!
Derek
>>> [EMAIL PROTECTED] 2004/08/13 05:37:52 PM >>>
> 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]
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]