Results 1 to 2 of 2

Thread: content of a variable not displayed in IE and Chrome

  1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Belgium
    Posts
    216
    Answers
    4

    Default content of a variable not displayed in IE and Chrome

    Hello,

    I'm doing the following to display a date update in a label xtype (I need to use html because, I've also added images and a couple of links:
    You can check the result here:
    http://ec.europa.eu/economy_finance/db_indicators/tab/

    In my ViewPort view: I want to add the content of my Global variable: Global.lastUpdate.

    Code:
    initComponent: function () {        var me = this;
            Ext.applyIf(me, {
                layout: 'border',
                items: [
                {
    				region: 'north',
    				layout: 'hbox',
    				items:[
                	{
                		xtype: 'label',
                		flex: 1,
                		height: 105,
                		html:  ' Tax and Benefits' +
                				'	<div id="imgbreadcrumbs"></div> <i> (Last update: ' + Global.lastUpdate +
                				'	) </i>	<div id="imgright"></div>	</div>   </div>'
                	}
    In my main controller: I load the data through a store and then load it in Global.lastUpdate

    Code:
     init: function () {        var me = this;
            
            me.setGlobalLastUpdate();
    ...
    
    setGlobalLastUpdate: function ()
     	{
     		
     		storeLastUpdate = Ext.getStore('LastUpdateStore');
     		storeLastUpdate.load({
    			scope: this, 
    			callback: function(records, operation, success) 
    			{
     				lastDate = storeLastUpdate.data.first().data.lastDate;
     				lastDate = lastDate.substring(0,10);
     				Global.lastUpdate = lastDate;
    			}
     		});
    This code works fine with Firefox but not in IE and Chrome. I guess it's because the Global.lastUpdate is filled with the value after displaying the label.

    Any idea how I can correct this?

    Thanks,

    Marxan

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Which runs first: the initComponent method or the storeLastUpdate callback?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •