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

Re: [ydn-javascript] Create menu from XHR? using dataSource?

Expand Messages
  • Satyam
    Excellent idea! Few people realize the DataSource is an independent component. The DataSource can be used to fetch data independently of the other components
    Message 1 of 2 , Mar 6, 2008
    • 0 Attachment
      Excellent idea! Few people realize the DataSource is an independent
      component.

      The DataSource can be used to fetch data independently of the other
      components usually associated with it. You set it up as you would usually
      do for the DataTable or Charts components and then you simply call the
      sendRequest method setting a function of yours as the callback handler for
      the data fetched:

      http://developer.yahoo.com/yui/datasource/#sendrequest

      NEVERTHELESS: The DataSource is only capable of fetching a flat structure
      of data, if your data it has a hierarchical (nested) structure (as a menu
      often has), it can't make sense of it, it will only retrieve the first,
      shallowest instance of each item.

      Satyam


      ----- Original Message -----
      From: "mathew.rowley" <mathew.rowley@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Thursday, March 06, 2008 7:39 PM
      Subject: [ydn-javascript] Create menu from XHR? using dataSource?


      > Is there a way to use dataSource as the menu items for a menu button?
      > or, do I have to manually parse the XML and create a js array to put
      > into the menu?
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
      > 05/03/2008 18:38
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.