Loading ...
Sorry, an error occurred while loading the content.

URGENT! Datasource help needed please!

Expand Messages
  • david_c1986
    Hi I have a servlet that returns xml: Testing I have a response schema correctly set up identifying the
    Message 1 of 3 , Apr 2, 2008
    • 0 Attachment
      Hi
      I have a servlet that returns xml:

      <ResultSet><Result><Field>Testing</Field></Result></ResultSet>

      I have a response schema correctly set up identifying the reusltNode
      and fields.

      I have a callback function correctly set up which receives the
      response from the dataSource.sendRequest method. How can i return the
      fields from the oParsedResponse?
      Is it something like: oParsedResponse.results[0].fields?????

      Please help, been at this for hours
      Thanks
      David
    • y_lsmith
      ... David, responseSchema = { fields : [ foo , bar ] }; In your callback: oParsedResponse.results[0].foo points to the parsed value retrieved from the raw
      Message 2 of 3 , Apr 2, 2008
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "david_c1986" <david_c1986@...>
        wrote:
        >
        > Hi
        > I have a servlet that returns xml:
        >
        > <ResultSet><Result><Field>Testing</Field></Result></ResultSet>
        >
        > I have a response schema correctly set up identifying the reusltNode
        > and fields.
        >
        > I have a callback function correctly set up which receives the
        > response from the dataSource.sendRequest method. How can i return the
        > fields from the oParsedResponse?
        > Is it something like: oParsedResponse.results[0].fields?????
        >
        > Please help, been at this for hours
        > Thanks
        > David
        >

        David,

        responseSchema = { fields : [ 'foo', 'bar' ] };

        In your callback:
        oParsedResponse.results[0].foo

        points to the parsed value retrieved from the raw data fetched by the
        DataSource.

        Hope this helps,
        Luke
      • david_c1986
        Thanks did the trick
        Message 3 of 3 , Apr 3, 2008
        • 0 Attachment
          Thanks did the trick
        Your message has been successfully submitted and would be delivered to recipients shortly.