RE: XForms and Ajax

Hi Suzan,

> I actually found myself using XMLHttpRequest in conjunction 
> with XForms recently. Partially because I initially had empty 
> repeats, and so no final member to copy.

You can use the new xf:duplicate action. It's in XForms 1.1, but is already
supported in a number of implementations.


> But mainly to retrieve a server-side initialized structure with
> an unique id.

Just set an instance up as normal for a submission, and then fire the
submission on xforms-ready or xforms-model-construct-done. We use this
technique a lot, and the nice thing is that if the instance that you are
submitting is itself initialised with @src, you can change how you query for
the second lot of instance data. (For example, a user saves some preferences
to a server, and your form first loads those preferences using @src, and
then fires a submission on xforms-ready that retrieves the data relevant to
their saved preferences.)


> That said, it's still a hardly-portable workaround. Maybe 
> I should dub the practice: 'Feijenoord' ;o)

I've Googled and Babelfished, and I can't work out what you mean -- sorry!
Is it where you are based?

Regards,

Mark



Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Thursday, 28 April 2005 13:02:17 UTC