Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to pull data into an XForm instance from a RESTful Submission

0 views
Skip to first unread message

lonetraveller

unread,
Jul 10, 2008, 9:15:11 PM7/10/08
to
Hi
I have a Restful server application running in Tomcat. This Restful
server has a config file defines a parameterized query like:
select * from tableX where column1='joe'

On launching the following page:
http://localhost:8080/Restfulserver/lists/tableX

an XML page is returned which is a representation of the rows returned
as a result of the query defined in the config file.

Now, inside my XForm I have the following code: My goal is to get the
contents of the XML from the Server into an instance in the XForm
called DataResponse and then automatically populate text controls in
the XML with the data.
Whatever I do however does not seem to be successful in getting data
into the XForm. Any suggestions are appreciated.
<xforms:instance id="DataResponse">
<fe:person>
<fe:lastname/>
<fe:firstname></fe:firstname>
<fe:email/>
</fe:person>
</xforms:instance>

-----------

<xforms:submission id="submit" action="http://localhost:9001/
RestServer/lists/person" method="get"
replace="instance" instance="DataResponse" separator="&amp;">
</xforms:submission>
-------------------------------------------
<xforms:textarea ref="instance('DataResponse')/fe:email">
<xforms:label>Email:</xforms:label>
<xforms:message level="ephemeral" ev:event="DOMFocusIn">
Do you find stuff in here that the XML Server sent back!!
</xforms:message>
<xforms:action ev:event="DOMActivate">
<xforms:send submission="submit"/>
</xforms:action>
</xforms:textarea>
------------------------------------------------------------

0 new messages