PDA

View Full Version : problem in updating tabpanel title



hemant1
24 Jun 2011, 12:58 AM
Hi
In my application i m creating 5 tab bars and fetching the value from xml file
fetched value is display properly
but my problem is when i want to update the title of TabPanel items it show me blank
i put the alert after updating the TabPanel title it shows me proper title in alert but in application tab Panel title displays blank
what i m doing wrong pls tell me





demos.Tabs = new Ext.TabPanel({
sortable: true, // Tap and hold to sort
ui: 'dark',
items: [{
title: " ",
html: " ",
// cls: 'card card3'
},
{
title: " ",
html: "",
// cls: 'card card4'
},
{
title: " ",
html: "2",
// cls: 'card card3'
},
{
title: " ",
html: " ",
// cls: 'card card3'
},{
title:" ",
html:" ",
}]
},
Ext.Ajax.request({
url: 'interaction/inter1.xml',
success: function (response, opts) {
obj = response.responseText;

xmlDoc = parseXML(obj);

main_content = xmlDoc.getElementsByTagName("Interactions");

x = main_content[0].getElementsByTagName("tab");

for (i = 0; i <= x.length; i++) {
total = "";
var count = x[i].getElementsByTagName("text").length;
for (j = 0; j < count; j++) {
total = total + x[i].getElementsByTagName("text")[j].childNodes[0].nodeValue;

}


demos.Tabs.items.get(i).html=total;
var title=x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
alert(title);
demos.Tabs.items.get(i).title=title;
alert(demos.Tabs.items.get(i).title);


}
}
})
);


thanks