W3C home > Mailing lists > Public > www-forms@w3.org > January 2004

RE: How to display data retrieved from database

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Mon, 5 Jan 2004 15:45:07 -0000
To: "'Sarah Zou'" <sarahpro2003@yahoo.com>
Cc: <www-forms@w3.org>
Message-ID: <008101c3d3a2$e83361b0$6b01a8c0@W100>

Hi Sarah,

> Could someone let me know if it is possible
> to use XForms + servlet to display data retrieved form database?

You can use external instance data by using the src attribute on your
instance element:

    <xf:model>
        <xf:instance src="myurl" />
    </xf:model>

One of the limitations of this approach is that you can only do what
amounts to an HTTP GET. There is talk on the XForms Working Group of
allowing more flexibility here, perhaps using the xf:submission element
to express the initial instance data request, but as of XForms 1.0 this
is not possible.

However, if you do need to get your initial instance data using a POST
or something else, then you could hook up to the xforms-ready event, and
fire a submission that uses some instance data that you had already
prepared.

(And of course, you could even use an initial GET request via @src to
obtain this pre-prepared instance data for the POST ... depending on how
brave you are!)

Regards,

Mark


Mark Birbeck
CEO and CTO
x-port.net Ltd.

Download our 100% compliant XForms processor
From http://formsPlayer.com/
Received on Monday, 5 January 2004 10:45:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:57 GMT