Saturday, November 29, 2008

Catalyst Action REST - ExtJS TreeLoader

Catalyst doesn't play with ExtJS TreeLoader by default as the View::JSON returns hashes of JSON data, ExtJS TreeLoader requires an array. However you can setup View::JSON to expose a set hash key only, therefore only the array is returned.

Note that on existing stashes you will need to pre-pend the existing key with an addition key 'json' to ensure existing functionality works.

Catalyst Controller

$c->stash->{json} = \@nodes; #array of treeloader data


Catalyst Application lib/app.pm


__PACKAGE__->config(
'View::JSON' => {
expose_stash => 'json', #extjs TreeLoader requires an array of data
}
);

40 comments:

想想 said...
This comment has been removed by a blog administrator.
幸運之神 said...
This comment has been removed by a blog administrator.
蔗個世界 said...
This comment has been removed by a blog administrator.
佩璇 said...
This comment has been removed by a blog administrator.
v辰原 said...
This comment has been removed by a blog administrator.
DeonKilgore23 said...
This comment has been removed by a blog administrator.
EarleP_Gre2285 said...
This comment has been removed by a blog administrator.
裕以 said...

Cool blog網愛聊天室色情網站交友找啦咧免費影片成人笑話成人圖庫sexy女同志聊天室愛戀情人用品情趣爽翻天咆哮小老鼠入口85cc6k脫衣人妻sexy85c脫光光taiwansex淫女情色成人男女做愛美女做愛脫衣秀a片正妹淫蕩色情後宮040185c85c77p2p77p2p性幻想手淫18禁

SungR_Auclair0佳亦 said...

謝謝您的分享~感恩唷!!..................................................

詩婷 said...

聰明的人喜歡猜心 雖然每次都猜對了卻失去了自己的心......................................................

Bob0104byWas0104ham said...

All roads lead to Rome. 堅持自己所選!.............................................

佩怡 said...

很高興見到你哦!!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

韋于倫成 said...

看看blog放鬆一下,工作累死了............................................

彥君彥君 said...

自然是上帝最偉大的神來之筆。 ............................................................

宛儒DarwinM_Pawlak0203 said...

Well done!............................................................

chrry said...

go2av免費影片sex 0401 影音 live 秀視訊聊天交友 色美眉台中援交aa 片試看 a免費視訊聊天網 情人34C波霸美女 香蕉鮑魚俱樂部,免費av 免費線上 aa 片試看 g點無碼a片 性愛姿勢 辣妹sex story 視訊聊天室 sex888免費看影片波霸美女寫真 視訊美女pixnet 成人交友hibb 4u成人視訊 情人080視訊網 私密論壇sex888免費看影片論壇 Show-live視訊聊天室 辣妹貼圖a片天堂 a片免費看 情色視訊禁地論壇 日本 a 片,無碼影片,美女,sexy,a片天堂 小魔女免費影城 視訊美女sogo 色論壇 s38live秀 卡通aa片免費看自拍天堂 洪爺免費線上歐美A片段觀看 亞洲東洋影片 0941 影音視訊聊天室 18成人85cc影城0204movie 成人漫畫區月光論壇 a片-情色成人影片 免費視訊toolbox 707網愛聊天室 1111辣妹貼圖,寫真集辣妹 av無碼月光論壇辣妹視訊 視訊辣妹主播脫衣秀 aio性愛dvd辣妹影片直播 黑澀會美眉 mv 高雄視訊,qq 美女貼圖片區 5i176 免費視訊秀 168論壇視訊辣妹 a片天堂s383視訊 bt電影下載,aa 片 sexy girl video movie 080cc成人色網 後官0951主入口 視訊聊天評比 視訊交友聊天室 no8 sogo論壇視訊辣妹

育淑 said...

感謝您寫下您的生活,也是把珍寶來和諸君分享的心意。.................................................................

婷珊 said...

一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼.................................................................                           

峻帆峻帆峻帆 said...

一棵樹除非在春天開了花,否則難望在秋天結果。.................................................................

婷珊 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

吳婷婷 said...

It takes all kinds to make a world.............................................................

亦妮 said...

支持好的blog~繼續加油~~..................................................................

陳韋夏陳韋夏益東富益東富 said...

有夢最美啦~~加油!元氣滿點!............................................................

吳婷婷 said...

如果成為一支火柴,也要點亮一個短暫的宇宙;如果是一隻烏鴉,也要叫疼閉塞的耳膜。..................................................................

錢靜怡錢靜怡錢靜怡 said...

要求適合自己的愛情方式,是會得到更多,還是會錯過一個真正愛你的人。.................................................................

宥妃宥妃 said...

相見亦無事,不來常思君.................................................................

芸茂芸茂 said...

Give a fool enough rope and he will hang himself...................................................

家榮家榮 said...

不要去想沒拿到的東西,多想想自己手裡所擁有的..................................................

林彥以林彥以 said...

喜歡看大家的文章,每篇都是一個故事,都是一種心情~~祝大家開心愉快..................................................................

吳淑芬吳淑芬 said...

Some people cannot see the wood for the trees.............................................................

嘉王偉 said...

男女互悅,未必廝守終生,相愛就是美的。.................................................................

黃於志豪士賢 said...

Pen and ink is wits plough...................................................................

建邱勳 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

吳沛黃以富民 said...

愛情不是慈善事業,不能隨便施捨。......................................................................

蕙陳春宗陳穎 said...

河水永遠是相同的,可是每一剎那又都是新的。............................................................

童建李宜昌智 said...

你不能改變容貌~~但你可以展現笑容.................................................................

于庭吳 said...

謝謝大大分享 我難過了ˋ 3ˊ............................................................

怡靜怡靜怡靜怡雯 said...

上來逛逛,踩個腳印給你~~~..................................................................

孫邦柔 said...

一棵樹除非在春天開了花,否則難望在秋天結果。......................................... ........................

孫邦柔 said...

培養健全孩子最好的方法是父母先成為健全的人。......................................................................