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

Re: [ydn-javascript] How to refresh a datatable when the datatable become from a datasource xml???

Expand Messages
  • Satyam
    In: http://developer.yahoo.com/yui/datatable/#datasource read the section titled getting more data Satyam
    Message 1 of 5 , Oct 1, 2008
    • 0 Attachment
      In:

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

      read the section titled "getting more data"

      Satyam

      irene_varas2005 wrote:
      > Hi i'm trying to refresh the data of the datatable using
      > onReturnDataInicializeTable
      > but i think it works only when the datasource notice that a new row is
      > node is added in the xml , i want to refresh the datatable when a cell
      > change for example
      > first teh xml is
      > <id>1</id>
      > <count>30</count>
      > then the xml change to
      > <id>1</id>
      > <count>31</count>
      >
      > how can i refresh the datatable in this case
      >
      > regards
      > irene
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.169 / Virus Database: 270.7.5/1700 - Release Date: 30/09/2008 11:03
      >
      >
    • irene varas
      hi .. i have a question.. when i use the method senRequest for example myDataTable.getDataSource().sendRequest( ,myDataTable.onDataReturnInitializeTable,
      Message 2 of 5 , Oct 1, 2008
      • 0 Attachment
        hi .. i have a question.. when i use the method  senRequest  for example

        myDataTable.getDataSource().sendRequest('',myDataTable.onDataReturnInitializeTable, myDataTable);

        what exactly do the callback onDataReturnInitializeTable?? the callback compare the original data with the actual data or direct retrieve the data???? there are any cache ??? 

        my problem is the next my application is about join in to courses, for example in the datatable the user can view courses like.. math, language, etc and each course have quote, there are "n" users using the application, the users can do request to the server to register in a course, every time  the quote is lower for example 

        time 1
        Course        quote 
        Español       35 
        Mathematic  22 
        Grammar      29

        time 2  
        Course        quote 
        Español       32 
        Mathematic  19 
        Grammar      10

        i need, when a user register in a course all the other users can view that the quote is lower 
        how can i do that 

        help me please 
        sorry for my bad english


         

        2008/10/1 Satyam <satyam@...>

        In:

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

        read the section titled "getting more data"

        Satyam

        irene_varas2005 wrote:
        > Hi i'm trying to refresh the data of the datatable using
        > onReturnDataInicializeTable
        > but i think it works only when the datasource notice that a new row is
        > node is added in the xml , i want to refresh the datatable when a cell
        > change for example
        > first teh xml is
        > <id>1</id>
        > <count>30</count>
        > then the xml change to
        > <id>1</id>
        > <count>31</count>
        >
        > how can i refresh the datatable in this case
        >
        > regards
        > irene
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ----------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - http://www.avg.com
        > Version: 8.0.169 / Virus Database: 270.7.5/1700 - Release Date: 30/09/2008 11:03
        >
        >




        --
        " Prefiero almas altivas y altaneras que serviles y rastreras, porque se puede perdonar a las panteras, pero nunca, jamás a los reptiles "
        Napoleon Bonaparte
      • Satyam
        ... onDataReturnInitializeTable does just that,it initializes the table as if it had not been there before, it doesn t compare to what s already in, it doesn t
        Message 3 of 5 , Oct 1, 2008
        • 0 Attachment
          irene varas wrote:
          > hi .. i have a question.. when i use the method senRequest for example
          >
          > myDataTable.getDataSource().sendRequest('',myDataTable.onDataReturnInitializeTable,
          > myDataTable);
          >
          > what exactly do the callback onDataReturnInitializeTable?? the
          > callback compare the original data with the actual data or direct
          > retrieve the data????
          onDataReturnInitializeTable does just that,it initializes the table as
          if it had not been there before, it doesn't compare to what's already
          in, it doesn't care at all about what's in, it draws it all again.
          > there are any cache ???
          >
          > my problem is the next my application is about join in to courses, for
          > example in the datatable the user can view courses like.. math,
          > language, etc and each course have quote, there are "n" users using
          > the application, the users can do request to the server to register in
          > a course, every time the quote is lower for example
          >
          > time 1
          > Course quote
          > Español 35
          > Mathematic 22
          > Grammar 29
          >
          > time 2
          > Course quote
          > Español 32
          > Mathematic 19
          > Grammar 10
          >
          > i need, when a user register in a course all the other users can view
          > that the quote is lower
          > how can i do that
          >
          Yours is not a User Interface issue, it is the normal issue any
          reservation system deals with everyday and has dealt with for decades.
          Usually, this is not a problem until you get to the very last few
          places, users can hardly care if there are 35 or 32, they only care if
          they get their seat in that course.

          What you should be really concerned about is how you update the
          database, make sure your reservation is made in a single, atomic SQL
          operation, usually through an uninterrupted stored procedure. If you
          don't get to do the update in the database atomic, you might
          unintentionally create over-bookings.

          As for the user, it is first come-first served, and if you took your
          time thinking about it, you missed. I wouldn't even care to show the
          exact number of places available, I would show them in red if there are
          five or less, yellow for 10 or less, blue for 20 or less and green above
          30. Users should know that if they take too long to decide on red ones,
          they might miss the course, yellow they might think about it for a while
          and green they may wait until next day. You put your own scale for a
          real case. Just give them a hint of how tight things are, there is
          probably no need to be so precise. If you give them numbers, people
          will complain that the numbers are not accurate, if you just give them a
          hint, the hint was red and when they decided, the system says "sorry,
          your request could not be granted", what can they say! Someone else was
          faster.


          > help me please
          > sorry for my bad english
          Not bad at all but, of course, native English speakers might think
          otherwise ;-)

          Satyam

          >
          >
          >
          >
          > 2008/10/1 Satyam <satyam@... <mailto:satyam@...>>
          >
          > In:
          >
          > http://developer.yahoo.com/yui/datatable/#datasource
          >
          > read the section titled "getting more data"
          >
          > Satyam
          >
          > irene_varas2005 wrote:
          > > Hi i'm trying to refresh the data of the datatable using
          > > onReturnDataInicializeTable
          > > but i think it works only when the datasource notice that a new
          > row is
          > > node is added in the xml , i want to refresh the datatable when
          > a cell
          > > change for example
          > > first teh xml is
          > > <id>1</id>
          > > <count>30</count>
          > > then the xml change to
          > > <id>1</id>
          > > <count>31</count>
          > >
          > > how can i refresh the datatable in this case
          > >
          > > regards
          > > irene
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > > ----------------------------------------------------------
          > >
          > >
          > > No virus found in this incoming message.
          > > Checked by AVG - http://www.avg.com
          > > Version: 8.0.169 / Virus Database: 270.7.5/1700 - Release Date:
          > 30/09/2008 11:03
          > >
          > >
          >
          >
          >
          >
          > --
          > " Prefiero almas altivas y altaneras que serviles y rastreras, porque
          > se puede perdonar a las panteras, pero nunca, jamás a los reptiles "
          > Napoleon Bonaparte
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - http://www.avg.com
          > Version: 8.0.169 / Virus Database: 270.7.5/1702 - Release Date: 01/10/2008 9:05
          >
          >
        • irene varas
          you are right thanks satyam :) 2008/10/1 Satyam ... -- Prefiero almas altivas y altaneras que serviles y rastreras, porque se puede
          Message 4 of 5 , Oct 1, 2008
          • 0 Attachment
            you are right 

            thanks satyam :) 

            2008/10/1 Satyam <satyam@...>



            irene varas wrote:
            > hi .. i have a question.. when i use the method senRequest for example
            >
            > myDataTable.getDataSource().sendRequest('',myDataTable.onDataReturnInitializeTable,
            > myDataTable);
            >
            > what exactly do the callback onDataReturnInitializeTable?? the
            > callback compare the original data with the actual data or direct
            > retrieve the data????
            onDataReturnInitializeTable does just that,it initializes the table as
            if it had not been there before, it doesn't compare to what's already
            in, it doesn't care at all about what's in, it draws it all again.

            > there are any cache ???
            >
            > my problem is the next my application is about join in to courses, for
            > example in the datatable the user can view courses like.. math,
            > language, etc and each course have quote, there are "n" users using
            > the application, the users can do request to the server to register in
            > a course, every time the quote is lower for example
            >
            > time 1
            > Course quote
            > Español 35
            > Mathematic 22
            > Grammar 29
            >
            > time 2
            > Course quote
            > Español 32
            > Mathematic 19
            > Grammar 10
            >
            > i need, when a user register in a course all the other users can view
            > that the quote is lower
            > how can i do that
            >
            Yours is not a User Interface issue, it is the normal issue any
            reservation system deals with everyday and has dealt with for decades.
            Usually, this is not a problem until you get to the very last few
            places, users can hardly care if there are 35 or 32, they only care if
            they get their seat in that course.

            What you should be really concerned about is how you update the
            database, make sure your reservation is made in a single, atomic SQL
            operation, usually through an uninterrupted stored procedure. If you
            don't get to do the update in the database atomic, you might
            unintentionally create over-bookings.

            As for the user, it is first come-first served, and if you took your
            time thinking about it, you missed. I wouldn't even care to show the
            exact number of places available, I would show them in red if there are
            five or less, yellow for 10 or less, blue for 20 or less and green above
            30. Users should know that if they take too long to decide on red ones,
            they might miss the course, yellow they might think about it for a while
            and green they may wait until next day. You put your own scale for a
            real case. Just give them a hint of how tight things are, there is
            probably no need to be so precise. If you give them numbers, people
            will complain that the numbers are not accurate, if you just give them a
            hint, the hint was red and when they decided, the system says "sorry,
            your request could not be granted", what can they say! Someone else was
            faster.


            > help me please
            > sorry for my bad english
            Not bad at all but, of course, native English speakers might think
            otherwise ;-)

            Satyam

            >
            >
            >
            >
            > 2008/10/1 Satyam <satyam@... <mailto:satyam@...>>

            >
            > In:
            >
            > http://developer.yahoo.com/yui/datatable/#datasource
            >
            > read the section titled "getting more data"
            >
            > Satyam
            >
            > irene_varas2005 wrote:
            > > Hi i'm trying to refresh the data of the datatable using
            > > onReturnDataInicializeTable
            > > but i think it works only when the datasource notice that a new
            > row is
            > > node is added in the xml , i want to refresh the datatable when
            > a cell
            > > change for example
            > > first teh xml is
            > > <id>1</id>
            > > <count>30</count>
            > > then the xml change to
            > > <id>1</id>
            > > <count>31</count>
            > >
            > > how can i refresh the datatable in this case
            > >
            > > regards
            > > irene
            > >
            > >
            > >
            > > ------------------------------------
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > > ----------------------------------------------------------
            > >
            > >
            > > No virus found in this incoming message.
            > > Checked by AVG - http://www.avg.com
            > > Version: 8.0.169 / Virus Database: 270.7.5/1700 - Release Date:
            > 30/09/2008 11:03
            > >
            > >
            >
            >
            >
            >
            > --
            > " Prefiero almas altivas y altaneras que serviles y rastreras, porque
            > se puede perdonar a las panteras, pero nunca, jamás a los reptiles "
            > Napoleon Bonaparte
            >
            > ----------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - http://www.avg.com
            > Version: 8.0.169 / Virus Database: 270.7.5/1702 - Release Date: 01/10/2008 9:05
            >
            >




            --
            " Prefiero almas altivas y altaneras que serviles y rastreras, porque se puede perdonar a las panteras, pero nunca, jamás a los reptiles "
            Napoleon Bonaparte
          Your message has been successfully submitted and would be delivered to recipients shortly.