Upayavira wrote:

Guido Casper wrote:

Upayavira wrote:


Marc Portier wrote:




now, in this case backendX is cocoon (modifiable) sources, so I would
guess some saveToSource/loadFromSource can be made quite generic and
might very well be candidates for natural extension of the woody2.js

Yup. You've confirmed what I suspected. What I was (indirectly) getting at, is that binding to a source goes a little further than binding to DOM or bean, but remains very generic, and would be delighted to see it in woody2.js.

If/when I get to doing my modifiable XMLDBSource, I'll try adding this
to woody2.js, unless you beat me to it!


IIUC you can pretty much copy what's in loadDocument and saveDocument of
binding_example.js These are already generic to any (modifiable) source.


Ah, great. I was going to look there. I've got the XMLDBSource coded, and am testing at the mo, so that's my next port of call.


Thinking about this - why not use the Javascript version of instanceof within form.load and form.save to transparently detect the type of the object passed to it? Then, if the object is a source, it is read from/written to, otherwise it is handled as at present.

This keeps the interface much the same, but adds some really useful functionality.

What do you think?

Regards, Upayavira




Reply via email to