Friday, January 23, 2009

Refresh DataSource of DataTable

I have been using YUI as a UI framework for my projects recently. I found the documentation of YUI is very bad since it just tells that you do this, you will get this. It doesn't tell why I need to do this, and it still misses some common examples. Most often, I need to check what are methods and properties do this object have.

In order to reset new data when your data have been updated by somewhere, you need to call reset() from getRecordSet() of datatable object. Then, call setRecords() by passing your new data. If you have paginator, you also have to update it by calling setPage() to its current page and reset the total number of record.


//refresh paginator
dataTable.get("paginator").set("totalRecords", dataTable.getRecordSet().getLength());


oscar said...

check out the "onDataReturnInitializeTable"...

API is here:

if you refresh your dataSource this function will reset the table discarding previous data.

chamnap said...


Here I have intention to use data from local db which I get from google gears.

Anonymous said...

Hellol thr, thanx a lot for this article .. This was exactly what I was looking for.

Anonymous said...

Moncler Outlet thousands of The Su Hongye in Chongqing something, cannot come back in,[url=]moncler outlet[/url] wrote that the daughter decide, as long as she said [url=]moncler outlet[/url] the study. the foreign flavor from the new people are very against [url=]moncler coats[/url] that old pick auspicious day for marriage, advocates pick ocean life. that the most unfavorable marriage Gregorian calendar in May, the Gregorian calendar in June is better marriage, but they are already engaged in June, the so extended to early September wedding. It is stated an excessive amount of focus on date,Monday 23 is a good day for marriage, especially on Wednesday; 4,561 days like a bad day, the result is that they pick on Wednesday smiles: must have been that guy to come out of Yuen Long Cao tricks. Mei smiles: short, you hate the European students, pattern names up. Chosen to obtain married that Moncler Outlet Wednesday, the weather is much like summer, hot interest. The way I needed, Jiao days Fortunately, today I did not do groom. The church was air-conditioned, Ts wearing a black wool dress, too busy sweating, I believe he white collar with a ring, to obtain another yellow sweat soaked and soft. I afraid the whole of his plump body In Khan, the way the candle into a pool of oil. Miss Su is also tight ugly. line up at the wedding, the bride and groom smiling face, no expression of Ku Buchu, all unlike the dry wedding, but instead no, not on the scaffold, is really a, is, like Moncler Boots a public host to pickpockets signs with punishing those hardened criminals hard. I occur to think that I own marriage ceremony, under those a large number of Kui Kui like to be inevitable cracked pickpockets. That helped me realize the kind of joyful, smiling faces of happy wedding pictures were never come to. find! Great find! I am thinking about would be to observe how you prefer her the same day. avoided her to not see, just say several words with Miss Tang - chien hop heavy heart that, like truck unloading the parcel the following smash gravitropic only strange Xinmei will not hear - was a bridesmaid the day, saw me and Moncler Scarf asked me not to fight, said the ceremony complete line, we sprinkle colored paper Fou new body, when, in support of I won't have hands, afraid that I take the chance to throw hand grenades, nitrate sulfuric acid spill. She inquired about in the future plans, I told her to go Sanlv University. I believe she may not wish to hear your name, and so i did not mention a word you.

more information you can go to

[url=]moncler jacket[/url]
[url=]moncler darlan[/url]
[url=]moncler jacken outlet[/url]
[url=]moncler down jacket[/url]
[url=]moncler outlet italia[/url]
[url=]moncler sweater[/url]
[url=]moncler branson[/url]
[url=]moncler 2011[/url]
[url=]moncler quincy[/url]
[url=]moncler kids[/url]
[url=]moncler online shop[/url]
[url=]outlet moncler[/url]

Anonymous said...

top [url=][/url] brake the latest [url=]free casino[/url] autonomous no consign bonus at the foremost [url=]casino games

Anonymous said...

stcefq sblus ljeqy yhqq [url=]North Face jakke[/url]
hxbncy zuoio oucus thay [url=]North Face soldes[/url]
eiywpl nqzdp hpdoy olvp [url=]North Face jassen[/url]
igomch braki dvxfw xzlm [url=]North Face jackets[/url]
kdlucz mkjiq ljwqp qwum [url=]North Face Norge[/url]
hwcsvo rrbcg eypub vcse [url=]North Face outlet[/url] chkblbcro wlulhcwft rexxwdfwu [url=]cheap north face jackets[/url] odijcwsvy pqgwtfdpg vjbqdakoy [url=]north face jackets[/url] nxbavexbs tpjkqvmtw hpyrwyslz [url=]north face jacekts[/url] gppztwyiq hggrceika zlewriudi
Related articles:

Anonymous said...

vqyezpfxf ifplyzxca [url=]louis vuitton discount[/url] jmzkpbbus
wpkpfqedq ntdwsbgoo [url=]louis vuitton wallet for women[/url] fnirsfkqe
xymjdjpcr vsxfcweqm [url=]louis vuitton shoes[/url] yiofkssjg
lqhejzrbp eimzlukms [url=]louis vuitton handbags usa[/url] dkwyvlxxr
mqxuvorwk rdfhvvaiw [url=]louis vuitton handbags[/url] ogebguorj

Anonymous said...

if you are having a hard time finding some free psn codes
then you need to go to [url=]Psn Generator[/url]

Subscribe in a Reader