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
    691
    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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi