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

Putting the pieces together

Expand Messages
  • Frank Policastro
    I know this may seem like a simple question, but it would go a long way in helping me if anyone could give me a good answer. I am new to yui and I like what I
    Message 1 of 4 , May 28 11:55 AM
    • 0 Attachment
      I know this may seem like a simple question, but it would go a long way in helping me if anyone could give me a good answer.

      I am new to yui and I like what I see so far, but here is what I need to do. I want a datatable, and when i click on a cell in the first column (holding a name for example) i replace the first datatable with a more specific datatable drilling down on the name the user selected.

      i got the first table up and running, i understand the event handler and got it to just alert me with a cell's value when i click on that cell but i am not seeing the best way to complete the big picture when it comes to removing my first grid and replacing it with the second one.

      all the examples write functions that get run when the load event listener is triggered. should I make some parameter available on the page so the javascript can do either A or B based on this param's value?

      Or is there a better pattern to follow and I just haven't seen it yet?

      Thanks,
      Frank
    • Satyam
      You might want something like this: http://satyam.com.ar/yui/#TableWithDetails more below ... Does the drill down table have the same structure, meaning same
      Message 2 of 4 , May 29 12:47 AM
      • 0 Attachment
        You might want something like this:

        http://satyam.com.ar/yui/#TableWithDetails

        more below

        Frank Policastro escribió:
        > I know this may seem like a simple question, but it would go a long way in helping me if anyone could give me a good answer.
        >
        > I am new to yui and I like what I see so far, but here is what I need to do. I want a datatable, and when i click on a cell in the first column (holding a name for example) i replace the first datatable with a more specific datatable drilling down on the name the user selected.
        >
        Does the drill down table have the same structure, meaning same
        columns? If so, there could be some optimization by reusing the same
        one, thought I don't think it would really matter that much. Anyway,
        instead of replacing the original datatable with another, it might be
        easier to hide the first one and display the second one. It would also
        allow you to return to the original one in no time, just un-hide it.
        > i got the first table up and running, i understand the event handler and got it to just alert me with a cell's value when i click on that cell but i am not seeing the best way to complete the big picture when it comes to removing my first grid and replacing it with the second one.
        >
        From the first selection you have to be able to reach the record via
        method getRecord. Once you get the Record object for the record
        selected/clicked on/checkmarked, whatever, you can use method getData to
        read any field from it, even those not shown on the table but read from
        the DataSource (for example, auto-incrementing primary keys from a
        database, which really mean nothing to the user). You can use those
        values to assemble the query part of a URL which you would then put into
        the initialRequest configuration attribute to make the second request.
        > all the examples write functions that get run when the load event listener is triggered. should I make some parameter available on the page so the javascript can do either A or B based on this param's value?
        >
        Not sure what you are asking here. If you are thinking on loading the
        page for the general table and then once again for the details, that's
        not a good idea. Loading a page takes plenty of time and several
        requests. If you can have both tables in the same page, you will load
        the YUI library once as well as icons, backgrounds, plus the time it
        takes for the browser to layout all those elements on the screen, most
        of which, if not all, will get lost if you reload the page. For such a
        closely related set of elements such as these two datatables, you will
        get a better user experience if you have both on the same page and show
        them selectively.
        > Or is there a better pattern to follow and I just haven't seen it yet?
        >
        > Thanks,
        > Frank
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.339 / Virus Database: 270.12.43/2139 - Release Date: 05/28/09 08:10:00
        >
        >
      • Frank Policastro
        Satyam, You are the freaking man! Thank you so much, Frank
        Message 3 of 4 , May 29 7:33 AM
        • 0 Attachment
          Satyam,

          You are the freaking man!

          Thank you so much,
          Frank

          --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
          >
          > You might want something like this:
          >
          > http://satyam.com.ar/yui/#TableWithDetails
          >
          > more below
          >
          > Frank Policastro escribió:
          > > I know this may seem like a simple question, but it would go a long way in helping me if anyone could give me a good answer.
          > >
          > > I am new to yui and I like what I see so far, but here is what I need to do. I want a datatable, and when i click on a cell in the first column (holding a name for example) i replace the first datatable with a more specific datatable drilling down on the name the user selected.
          > >
          > Does the drill down table have the same structure, meaning same
          > columns? If so, there could be some optimization by reusing the same
          > one, thought I don't think it would really matter that much. Anyway,
          > instead of replacing the original datatable with another, it might be
          > easier to hide the first one and display the second one. It would also
          > allow you to return to the original one in no time, just un-hide it.
          > > i got the first table up and running, i understand the event handler and got it to just alert me with a cell's value when i click on that cell but i am not seeing the best way to complete the big picture when it comes to removing my first grid and replacing it with the second one.
          > >
          > From the first selection you have to be able to reach the record via
          > method getRecord. Once you get the Record object for the record
          > selected/clicked on/checkmarked, whatever, you can use method getData to
          > read any field from it, even those not shown on the table but read from
          > the DataSource (for example, auto-incrementing primary keys from a
          > database, which really mean nothing to the user). You can use those
          > values to assemble the query part of a URL which you would then put into
          > the initialRequest configuration attribute to make the second request.
          > > all the examples write functions that get run when the load event listener is triggered. should I make some parameter available on the page so the javascript can do either A or B based on this param's value?
          > >
          > Not sure what you are asking here. If you are thinking on loading the
          > page for the general table and then once again for the details, that's
          > not a good idea. Loading a page takes plenty of time and several
          > requests. If you can have both tables in the same page, you will load
          > the YUI library once as well as icons, backgrounds, plus the time it
          > takes for the browser to layout all those elements on the screen, most
          > of which, if not all, will get lost if you reload the page. For such a
          > closely related set of elements such as these two datatables, you will
          > get a better user experience if you have both on the same page and show
          > them selectively.
          > > Or is there a better pattern to follow and I just haven't seen it yet?
          > >
          > > Thanks,
          > > Frank
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > > ------------------------------------------------------------------------
          > >
          > >
          > > No virus found in this incoming message.
          > > Checked by AVG - www.avg.com
          > > Version: 8.5.339 / Virus Database: 270.12.43/2139 - Release Date: 05/28/09 08:10:00
          > >
          > >
          >
        • Satyam
          I assume that to be a good thing. :- . Happy to help. Satyam
          Message 4 of 4 , May 29 7:56 AM
          • 0 Attachment
            I assume that to be a good thing. :-\ .

            Happy to help.

            Satyam

            Frank Policastro escribió:
            > Satyam,
            >
            > You are the freaking man!
            >
            > Thank you so much,
            > Frank
            >
            > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
            >
            >> You might want something like this:
            >>
            >> http://satyam.com.ar/yui/#TableWithDetails
            >>
            >> more below
            >>
            >> Frank Policastro escribió:
            >>
            >>> I know this may seem like a simple question, but it would go a long way in helping me if anyone could give me a good answer.
            >>>
            >>> I am new to yui and I like what I see so far, but here is what I need to do. I want a datatable, and when i click on a cell in the first column (holding a name for example) i replace the first datatable with a more specific datatable drilling down on the name the user selected.
            >>>
            >>>
            >> Does the drill down table have the same structure, meaning same
            >> columns? If so, there could be some optimization by reusing the same
            >> one, thought I don't think it would really matter that much. Anyway,
            >> instead of replacing the original datatable with another, it might be
            >> easier to hide the first one and display the second one. It would also
            >> allow you to return to the original one in no time, just un-hide it.
            >>
            >>> i got the first table up and running, i understand the event handler and got it to just alert me with a cell's value when i click on that cell but i am not seeing the best way to complete the big picture when it comes to removing my first grid and replacing it with the second one.
            >>>
            >>>
            >> From the first selection you have to be able to reach the record via
            >> method getRecord. Once you get the Record object for the record
            >> selected/clicked on/checkmarked, whatever, you can use method getData to
            >> read any field from it, even those not shown on the table but read from
            >> the DataSource (for example, auto-incrementing primary keys from a
            >> database, which really mean nothing to the user). You can use those
            >> values to assemble the query part of a URL which you would then put into
            >> the initialRequest configuration attribute to make the second request.
            >>
            >>> all the examples write functions that get run when the load event listener is triggered. should I make some parameter available on the page so the javascript can do either A or B based on this param's value?
            >>>
            >>>
            >> Not sure what you are asking here. If you are thinking on loading the
            >> page for the general table and then once again for the details, that's
            >> not a good idea. Loading a page takes plenty of time and several
            >> requests. If you can have both tables in the same page, you will load
            >> the YUI library once as well as icons, backgrounds, plus the time it
            >> takes for the browser to layout all those elements on the screen, most
            >> of which, if not all, will get lost if you reload the page. For such a
            >> closely related set of elements such as these two datatables, you will
            >> get a better user experience if you have both on the same page and show
            >> them selectively.
            >>
            >>> Or is there a better pattern to follow and I just haven't seen it yet?
            >>>
            >>> Thanks,
            >>> Frank
            >>>
            >>>
            >>>
            >>> ------------------------------------
            >>>
            >>> Yahoo! Groups Links
            >>>
            >>>
            >>>
            >>> ------------------------------------------------------------------------
            >>>
            >>>
            >>> No virus found in this incoming message.
            >>> Checked by AVG - www.avg.com
            >>> Version: 8.5.339 / Virus Database: 270.12.43/2139 - Release Date: 05/28/09 08:10:00
            >>>
            >>>
            >>>
            >
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - www.avg.com
            > Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.