1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    29
    Vote Rating
    0
    shibbywowdude is on a distinguished road

      0  

    Default More than one tpl and dataview?

    More than one tpl and dataview?


    Would it be possible to have a single Ext.Panel and in that Panel call 2 Ext.DataView's that each have different tpl's?

    This is what I was thinking.

    Code:
    var dataView1 = new Ext.DataView({
                store: productStore,
                tpl: tpl3,
                autoHeight: true,
                class: 'product-overview',
                itemSelector: 'div.thumb-wrap',
                emptyText: 'No product description/picture'
                                    });
            
        var dataView2 = new Ext.DataView({
            store: reviewsStore2,
            tpl: tpl,
            autoHeight: true,
            class: 'reviews',
            itemSelector: 'div.thumb-wrap',
            emptyText: 'No reviews have been written'
                                    });
        
        var reviewsPanel = new Ext.Panel({
            id: 'reviews',
            layout: 'form',
            bodyStyle: 'background-color: #dfe8f6;',
            title: 'Reviews',
            hideBorders: true,
            anchor: '100% 96.5%',
            monitorValid: true,
            autoScroll: true,
            items: [dataView1, dataView2]
                                         });

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

      0  

    Default


    Of course. They are two different widgets.

    You must think about the layout manager which that Panel uses to arrange its two children.

    And anchor: '100% 96.5%'? What is that all about? You have something wrong somewhere.

Thread Participants: 1