Daniel Fagerstrom wrote:

I have written an adapter: org.apache.cocoon.forms.util.XMLAdapter between a form object and a simple XML format that can be used without needing to wriite a binding definition.


Thank you very much! I think this is a very valuable addition to Cocoon Forms and is the answer for many form applications which have straight binding.


One question - why do you make this explicit:

   // get the documentURI parameter from the sitemap which contains the
   // location of the file to be edited
   var documentURI = cocoon.parameters["documentURI"];

   // get the XML adapter
   var xmlAdapter = form.getXML();

// parse the document to a widget tree
var pipeUtil =
cocoon.createObject(Packages.org.apache.cocoon.components.flow.util.PipelineUtil);
pipeUtil.processToSAX(documentURI, null, xmlAdapter);



and don't hide it in the form.getXML() function?

e.g.
var xmlAdapter = form.getXML( cocoon.parameters["documentURI"] );

--
Reinhard



Reply via email to