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

Re: [ydn-javascript] Re: multiple datasources to build datatable

Expand Messages
  • Satyam
    Would dataReturnEvent work for you? I m not sure I understand the issue. This event gives you both the request and the reply so you have all the info that
    Message 1 of 5 , Oct 30, 2008
    • 0 Attachment
      Would dataReturnEvent work for you? I'm not sure I understand the
      issue. This event gives you both the request and the reply so you have
      all the info that can be had about requests, no matter what the
      DataSource used was.

      Satyam


      inna_work wrote:
      > I am appending each result to the table as described above.
      >
      > Since I run it in a loop and I have validation of data, I don't have a
      > way of determining that it's the last request going out.
      > I'd like to get some event back saying that search is done, i.e. the
      > last valid request has returned data.
      > Using "responseEvent" does not work in this situation, because my
      > request is different for every row, but I am using the same datasource
      > for all responses.
      >
      > Any suggestions on how to approach this?
      >
      > Thanks.
      > Inna
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
      >
      >> If you look at the example:
      >>
      >> http://developer.yahoo.com/yui/examples/datatable/dt_xhrjson.html
      >>
      >> you will see it reads in from three different queries. For POST
      >>
      > requests,
      >
      >> it does matter what part of the URL goes into the DataSource
      >>
      > constructor as
      >
      >> an argument and what into initialRequest or, later on, into sendRequest
      >> first argument. For GET requests, both parts simply get
      >>
      > concatenated and it
      >
      >> really doesn't mater where you split it. As you can see in the
      >>
      > example, the
      >
      >> data is shown in batches as it arrives so the user is not kept
      >>
      > waiting until
      >
      >> the very last one arrives.
      >>
      >> Satyam
      >>
      >>
      >>
      >>
      >> ----- Original Message -----
      >> From: "inna_work" <inna_home@...>
      >> To: <ydn-javascript@yahoogroups.com>
      >> Sent: Friday, June 06, 2008 12:15 AM
      >> Subject: [ydn-javascript] multiple datasources to build datatable
      >>
      >>
      >>
      >>> Hi,
      >>> I have multiple DataSources all with the same schema and they all need
      >>> to be in one DataTable. I am trying to find the best solution to put
      >>> them together such that the user does not have to wait for the results
      >>> from all DataSources before seeing fully populated DataTable.
      >>>
      >>> DataSource URLs are the same except for the last directory name.
      >>> http://hostname/dir1/dir2/queryDir (using REST)
      >>> Using JSON as responseType.
      >>>
      >>>
      >>> Can I use the last directory name same as query parameter?
      >>> How can I add rows to the table on each successful XHR?
      >>>
      >>> Thank you.
      >>>
      >>>
      >>>
      >>>
      >>> ------------------------------------
      >>>
      >>> Yahoo! Groups Links
      >>>
      >>>
      >>>
      >>>
      >>
      >>
      > --------------------------------------------------------------------------------
      >
      >>
      >> No virus found in this incoming message.
      >> Checked by AVG.
      >> Version: 8.0.100 / Virus Database: 270.0.0/1485 - Release Date:
      >>
      > 05/06/2008
      >
      >> 10:07
      >>
      >>
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.175 / Virus Database: 270.8.4/1754 - Release Date: 29/10/2008 7:45
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.