I will need a bit more guidance on how to set the value of the field to "new Packages.java.util.Date()". As there appears to be a few locations that relate to saving the form and I have only little Java experience. My binding file is:
That's not the binding file, but just flowscript. It's the okay for the proof of principle.
---
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function form2xml(form) {
var documentURI = cocoon.parameters["documentURI"];
var document = loadDocument(documentURI);
form.load(document);
form.showForm("form-display-pipeline");
form.
Here, immediately before saving, set the value of your date widget to the current date:
form.getWidget("myDate").value = new Packages.java.util.Date();
form.save(document);
This form.save(document) initializes the binding. Therefore you have to tell in the binding file how to bind the date widget to your <dateTime> element.
saveDocument(document, documentURI);
cocoon.sendPage("form-success-pipeline");
}
The rest (loadDocument and saveDocument) is just for reading and storing the XML.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
