1. #1
    Ext User
    Join Date
    Aug 2007
    Posts
    9
    Vote Rating
    0
    goalmac is on a distinguished road

      0  

    Question Accordion Rendering Problem - items array

    Accordion Rendering Problem - items array


    Hello,

    Can anyone tell me how to do it dynamically? Thanks.

    Original:
    Code:
                var itemArray = new Array();
    
                itemArray[0] = new Ext.Panel({
                    title: 'Accordion Item 1',
                    html: '<empty panel>',
                    cls:'empty'
                });
    
                itemArray[1] = new Ext.Panel({
                    title: 'Accordion Item 2',
                    html: '<empty panel>',
                    cls:'empty'
                });
    
                itemArray[2] = new Ext.Panel({
                    title: 'Accordion Item 3',
                    html: '<empty panel>',
                    cls:'empty'
                });
    
                itemArray[3] = new Ext.Panel({
                    title: 'Accordion Item 4',
                    html: '<empty panel>',
                    cls:'empty'
                });
    
                var accordion = new Ext.Panel({
                    region:'west',
                    margins:'5 0 5 5',
                    split:true,
                    width: 210,
                    layout:'accordion',
                    items: [itemArray[0], itemArray[1], itemArray[2], itemArray[3]]
                });
    The numbers of item in 'itemArray' is varied. I would like to code dynamically like this.
    Code:
                var accordion = new Ext.Panel({
                    region:'west',
                    margins:'5 0 5 5',
                    split:true,
                    width: 210,
                    layout:'accordion',
                    items: [itemArray]
                });
    Error prompts for 'header' is null or not an object. Any idea or solution?

    Thanks for your help.

    Regards,
    GM

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Think about it.

    The items config should be an Array

    itemArray is an Array


    ?

  3. #3
    Ext User
    Join Date
    Aug 2007
    Posts
    9
    Vote Rating
    0
    goalmac is on a distinguished road

      0  

    Default


    ic. Thanks.

Thread Participants: 1

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