PDA

View Full Version : Cant dynamically update a tab's contents - Sencha Touch



ggunders
7 Mar 2011, 12:03 PM
I am hoping one you genius's out there can help me out.

im just trying to autoLoad a webpage into a tabpanel

my stripped down example below.


Ext.setup({
phoneStartupScreen: 'phoneStartUp.png',
icon: 'icon.png',
glossyOnIcon: false,


onReady: function() {

var BASE_URL = 'http://192.168.2.16/';


var StatusPanel = new Ext.Panel({
autoLoad: {url: BASE_URL+'php/status.php', scope: this},
title: 'Status',
closable:false,
autoScroll:true
});

var contentPanel = new Ext.TabPanel({
region:'center',
deferredRender:false,
activeTab:0,
enableTabScroll:true,
items:[StatusPanel]
});




var rootPanel = new Ext.Panel({
fullscreen: true,
layouts: 'auto',
items: [contentPanel]
});


StatusPanel.on('render', function() {
StatusPanel.getUpdater().startAutoRefresh(5, BASE_URL+'php/status.php');
});



} // end onready()
});//end EXT

I dont undertand why the autoLoad method doesnt work in sencha touch, i have a similar page in Extjs and it works fine.

I keep running into my server side stuff working in extjs, but when i port the code over to sencha touch it fails.

any help appreciated.

thx