PDA

View Full Version : append instead of update



fourfingerwu
30 Dec 2010, 4:39 PM
Hi all

is it posiable to append to a compenets content html rather than updating it?

I have a standard Component i.e



var chat_list = new Ext.Component({
id:'chat_list',
tpl:[
'<tpl for=".">',
'<div class="{who} message clearfix">',
'<div class="user_tag">{time_stamp}</div>',
'<img src="{who}_user_img.png" class="user_pic"/> ',
'<img src="{who}_arrow.png" />',
'<div class="content">{msg}</div>',
'</div><br class="clear"/>',
'</tpl>']
});//chat_list


I am updating it from a ajax request.



chat_list.update(obj.results);


this there away of appending to the content area??

hope you can help me.

thanks

Mac

evant
30 Dec 2010, 4:51 PM
Check out the tplWriteMode config.

fourfingerwu
31 Dec 2010, 2:00 AM
hi evant

where do I find the details on the tplWriteMode config??
I have search for it in the docs for about an hour now with no luck

thanks again

Mac

evant
31 Dec 2010, 8:32 AM
http://dev.sencha.com/deploy/touch/docs/?class=Ext.Component&member=tplWriteMode