1. #1
    Sencha User
    Join Date
    Apr 2012
    Location
    shanghai,china
    Posts
    28
    Vote Rating
    0
    xiuping is on a distinguished road

      0  

    Default setItems dynamically

    setItems dynamically


    in my application, it has a container in the following:
    Code:
    xtype: 'container',
    id:'appsContainer',
    layout:'card',
    items:null,
    i set items dynamically for the container in the controller of my application as follows:
    Code:
    var appsListview=this.getAppsListview({			id : 'appsListview',
    			store : appsStore,
    			fullscreen:true,
    			scrollable : true,
    			style:'background:transparent'
    		
    		});
    		
    		var appsCarouselview=this.getAppsCarouselview({
    			id : 'appsCarouselview',
    			fullscreen:true,
    			direction : 'horizontal',
    			directionLock : true,
    			style:'background:transparent',
    			items : items
    		});
    		
    		//this.containerItems=[appsListview,appsCarouselview];
    		this.getAppsContainer().setItems([appsCarouselview,appsListview]);
    when i run the application,the items has been added to the container,but it can not be shown immediately.after i operate other function and come back to the container, the item in the container can be shown .
    i don't know where i am wrong, anybody can help me?

  2. #2
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    cause you using a card layout you have to set the active item as well with
    http://docs.sencha.com/touch/2-0/#!/...-setActiveItem

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Location
    shanghai,china
    Posts
    28
    Vote Rating
    0
    xiuping is on a distinguished road

      0  

    Default


    i add a line of code as follows,but it still cannot work.

    this.getAppsContainer().setItems([appsCarouselview,appsListview]);this.getAppsContainer().setActiveItem(0);

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar