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

inline Editor DropDownList data from database

Expand Messages
  • an0n73
    Hi all, I m new to YUI and have set up a datatable with inline editing. One of the fields has a dropdownlist for this. What I need is for the values in the
    Message 1 of 4 , Mar 31, 2009
    View Source
    • 0 Attachment
      Hi all,

      I'm new to YUI and have set up a datatable with inline editing. One of the fields has a dropdownlist for this. What I need is for the values in the dropdownlist to come from a database. I already have the existing datatable populated from a database using JSP. I now need to populate the dropdownlist using another datasource.
      I can't find any examples for this. Can anyone help whether JSP or PHP or anything.

      Thanks
    • an0n73
      ... I meant to say, Can anyone tell me the javascript call within the dropdownOptions call that I need. Is it some sort of call to another datasource? ie,
      Message 2 of 4 , Apr 1 2:04 AM
      View Source
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "an0n73" <an0n73@...> wrote:
        >
        > Hi all,
        >
        > I'm new to YUI and have set up a datatable with inline editing. One of the fields has a dropdownlist for this. What I need is for the values in the dropdownlist to come from a database. I already have the existing datatable populated from a database using JSP. I now need to populate the dropdownlist using another datasource.
        > I can't find any examples for this. Can anyone help whether JSP or PHP or anything.
        >
        > Thanks
        >
        I meant to say, Can anyone tell me the javascript call within the dropdownOptions call that I need. Is it some sort of call to another datasource? ie, something like YAHOO.example.myDS.field["name"] or something?
      • Satyam
        I was about to point you to this: http://satyam.com.ar/yui/making_your_own_datatable.html but it is sorely obsolete, most of it became useless with 2.6, either
        Message 3 of 4 , Apr 1 11:16 AM
        View Source
        • 0 Attachment
          I was about to point you to this:

          http://satyam.com.ar/yui/making_your_own_datatable.html

          but it is sorely obsolete, most of it became useless with 2.6, either
          because it became part of DataTable or it works in some other way.

          So, how would I do it nowadays? I would use a formatter function and in
          that formatter function I would store the reference to the DOM element
          of the dropdown somewhere and start an async connection (see Connection
          Manager) to fetch the options. When the async connection returns, I
          would fill the DOM select element which I saved before. You could use
          the arguments property on the call asyncRequest to store the reference
          to the Select element so it is queued along the connection. Also, you
          could build a cache of options list so that further combos get to reuse
          the same query. Since JavaScript objects act like hashes, you could use
          the query for the dropdown as the key to the data and if you find it
          there then you don't need to go to the server.

          Satyam


          an0n73 escribió:
          > Hi all,
          >
          > I'm new to YUI and have set up a datatable with inline editing. One of the fields has a dropdownlist for this. What I need is for the values in the dropdownlist to come from a database. I already have the existing datatable populated from a database using JSP. I now need to populate the dropdownlist using another datasource.
          > I can't find any examples for this. Can anyone help whether JSP or PHP or anything.
          >
          > Thanks
          >
          >
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 8.5.285 / Virus Database: 270.11.35/2033 - Release Date: 03/31/09 13:05:00
          >
          >
        • an0n73
          Thanks Satyam, I ll give it a try. As someone new to YUI, your articles have been very helpful!
          Message 4 of 4 , Apr 1 3:17 PM
          View Source
          • 0 Attachment
            Thanks Satyam, I'll give it a try.

            As someone new to YUI, your articles have been very helpful!

            --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
            >
            > I was about to point you to this:
            >
            > http://satyam.com.ar/yui/making_your_own_datatable.html
            >
            > but it is sorely obsolete, most of it became useless with 2.6, either
            > because it became part of DataTable or it works in some other way.
            >
            > So, how would I do it nowadays? I would use a formatter function and in
            > that formatter function I would store the reference to the DOM element
            > of the dropdown somewhere and start an async connection (see Connection
            > Manager) to fetch the options. When the async connection returns, I
            > would fill the DOM select element which I saved before. You could use
            > the arguments property on the call asyncRequest to store the reference
            > to the Select element so it is queued along the connection. Also, you
            > could build a cache of options list so that further combos get to reuse
            > the same query. Since JavaScript objects act like hashes, you could use
            > the query for the dropdown as the key to the data and if you find it
            > there then you don't need to go to the server.
            >
            > Satyam
            >
            >
            > an0n73 escribió:
            > > Hi all,
            > >
            > > I'm new to YUI and have set up a datatable with inline editing. One of the fields has a dropdownlist for this. What I need is for the values in the dropdownlist to come from a database. I already have the existing datatable populated from a database using JSP. I now need to populate the dropdownlist using another datasource.
            > > I can't find any examples for this. Can anyone help whether JSP or PHP or anything.
            > >
            > > Thanks
            > >
            > >
            > >
            > >
            > >
            > > ------------------------------------
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > > ------------------------------------------------------------------------
            > >
            > >
            > > No virus found in this incoming message.
            > > Checked by AVG - www.avg.com
            > > Version: 8.5.285 / Virus Database: 270.11.35/2033 - Release Date: 03/31/09 13:05:00
            > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.