小一時間ほどはまってしまった。
以下のようなDataViewがあったとする
view/PictureBookDetail.coffee
Ext.define "MyApp.view.PictureBookDetail",
extend: "Ext.DataView"
xtype: "picturebookdetail"
config:
baseCls: "comment-list"
itemTpl: 'picture:<tpl for=".">{picture}</tpl>'
view/PictureBookComments.coffee
Ext.define "MyApp.view.PictureBookComments",
extend: "Ext.DataView"
xtype: "picturebookdetail"
config:
baseCls: "comment-list"
itemTpl: 'comment:<tpl for=".">{comment}</tpl>'
これを、以下のように配置すると何も表示されない。
controller/Main.coffee
view = new Ext.Container
fullscreen: true
layout: 'card'
items: [
xtype: 'panel'
layoute: 'vbox'
items: [
xtype:'picturebookdetail'
store: pictureStore
,
xtype: 'picturebookcomments'
store: commentStore
]
]
MyApp.Viewport.push view
height をつけてやるとちゃんと表示される
controller/Main.coffee
view = new Ext.Container
fullscreen: true
layout: 'card'
items: [
xtype: 'panel'
layoute: 'vbox'
items: [
xtype:'picturebookdetail'
store: pictureStore
height: 100
,
xtype: 'picturebookcomments'
store: commentStore
height: 100
]
]
Ezuko.Viewport.push view