View Full Version : More than one tpl and dataview?

21 Apr 2010, 12:47 AM
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.

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]

21 Apr 2010, 12:49 AM
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.