Hello all:
I guess I answered my own question by looking at the actual
initializeTable() implementation in 241 v. 251. In 241, the method
takes a parameter (the new records) and does all the restting and
calls addRows() with the records. 251 DOES NOT accept the (any)
parameter and it DOES NOT call addRows().
So I changed my logic from calling initializeTable at all, and I just
call addRows instead. This, of course, added the rows to the ones
already there, so I needed a deleteRows first.
Now my code looks like this:
tblobject.deleteRows (0, pager.size);
tblobject.addRows (RESULT.data.rows);
Instead of this with 2.4.1:
tblobject.initializeTable(RESULT.data.rows);
It seems slower to "page" now, but that could be my vivid imagination
playing games with me!
I still would love to have some confirmation from the "masters" that
I've not done something "incorrect" with the toolset. Ie, is there a
better, preferred or "faster" way to make the table update with new
data?
Thanks,
~~bret
PS: Don't you guys "work" on Sunday! 
--- In ydn-javascript%40yahoogroups.com">ydn-javascript
yahoogroups.com, "bretlevy" <bret
...> wrote:
>
>
> Update:
>
> I started digging into the YUI scripts assuming this must be an
error
> (or change) in YUI (see original notes below). I find this code in
> 2.4.1:
>
> YAHOO.widget.DataTable.prototype.initializeTable = function(oData) {
> // Clear the RecordSet
> this._oRecordSet.reset();
>
> // Add data to RecordSet
> var records = this._oRecordSet.addRecords(oData);
>
> // Clear selections
> this._unselectAllTrEls();
> this._unselectAllTdEls();
> this._aSelections = null;
> this._oAnchorRecord = null;
> this._oAnchorCell = null;
>
> // Refresh the view
> this.refreshView();
> this.fireEvent("initEvent");
> };
>
> And this code in 2.5.1:
>
> initializeTable : function() {
> // Reset init flag
> this._bInit = true;
>
> // Clear the RecordSet
> this._oRecordSet.reset();
>
> // Clear selections
> this._unselectAllTrEls();
> this._unselectAllTdEls();
> this._aSelections = null;
> this._oAnchorRecord = null;
> this._oAnchorCell = null;
>
> // Clear sort
> this.set("sortedBy", null);
> },
>
> So it appears that initializeTable in 2.5.1 really DOES NOT do what
> it used to do. Before, I sent in my (new) data and after it
> cleared/rest everything, it updated the table (recordset) with my
> (new) data.
>
> Appearently that is no longer the case?
>
> How do I achieve the same functionality as before? I'm missing it
> somehow...
>
> Thanks,
> ~~bret
>
>
>
> --- In ydn-javascript%40yahoogroups.com">ydn-javascript
yahoogroups.com, "bretlevy" <bret
> wrote:
> >
> >
> > All:
> >
> > It is wonderful all the help, comments, and quick responses I see
> to
> > my (and others) posts from the community. What a joy it is to
work
> > with the FOSS community -- I can't believe I ever worked in the
> PUSS
> > (Proprietary Unopen Source Software) world!
> >
> > Anyway, I continue to suffer from some incompatibility (or bug)
> > between 2.4.1 and 2.5.1. I do custom client-side pagination, and
> > it "breaks" in 2.5.1. I have a large JSON object that I extract
> > a "page" from as one navigates the dataset, and I use
> > widget.DataTable.initializeTable() to "refresh" the new page.
All
> > worked up until 2.5.1. I notice that the docs say to call render
()
> > separately after the initializeTable() and I do that (which seems
> to
> > be backwards compatible with 2.4.1). However, that table just
> > says "no records" once I call render(). I have verified that my
> > array (DS is type JS_ARRAY) has the right data in it.
> >
> > Here is the link to the "broken" 2.5.1 example:
> >
> > http://sandbox.bluelinkdirect.com/sandbox/client_page_table_1.html
> >
> > Here is the link to the working 2.4.1 example:
> >
> > http://sandbox.bluelinkdirect.com/sandbox/client_page_table_2.html
> >
> > Please note, I moved my testing to a different server, so note
the
> > new links if any of you have been following this saga. I just
> added
> > the domain to the host, so it may not be resolved for a few hours
> > (entered at 10:00 PM EDT (USA) on 29 March 2008).
> >
> > I have given up for the moment on scrolling tables, due to
several
> > issues (my tables may be very large), and server-side pagination
is
> > also undesirable for various reasons, so I really, really want my
> > current structure to continue to work under 2.5.1.
> >
> > Also note that I see worthy UI speed enhancements under 2.5.1 for
> > everything else, so I am eager to upgrade my live servers as soon
> as
> > possible!!!!
> >
> > Thanks again for your continued work and help community!
> >
> > ~~bret
> >
>
.