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

Request/Session data as DataSource

Expand Messages
  • Beena More
    Hi, I am new to YUI and I tried the autocomplete feature. I was going through the docs and couldnt find anything to make the the request or session objects as
    Message 1 of 2 , Feb 29, 2008
      Hi,

      I am new to YUI and I tried the autocomplete feature. I was going through the docs and couldnt find anything to make the the request or session objects as the datasource for autocomplete or any other features. How can I do this?

      I have a collection of operator objects, and I want to iterate this collection and use one of the name method as the text displayed as in the box, and id as the option.

      <html:options collection="operators" property="id" labelProperty="name"/>

      Thanks,
      Beena
    • Eric Miraglia
      Beena, You would need to create a JavaScript array of the data you re using; alternatively, you can create a JavaScript function DataSource that inspects
      Message 2 of 2 , Mar 3, 2008
        Beena,

        You would need to create a JavaScript array of the data you're using; alternatively, you can create a "JavaScript function" DataSource that inspects your session or request objects and returns data on demand.  See this example for how JS function DataSources can work:


        Regards,
        Eric


        On Feb 29, 2008, at 2:51 PM, Beena More wrote:

        Hi,

        I am new to YUI and I tried the autocomplete feature. I was going through the docs and couldnt find anything to make the the request or session objects as the datasource for autocomplete or any other features. How can I do this?

        I have a collection of operator objects, and I want to iterate this collection and use one of the name method as the text displayed as in the box, and id as the option.

        <html:options collection="operators" property="id" labelProperty="name"/>

        Thanks,
        Beena


      Your message has been successfully submitted and would be delivered to recipients shortly.