// create the Data Store
var store = new Ext.data.Store({
// load using HTTP
url: 'sheldon.xml',
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'Item',
id: 'ASIN',
totalRecords: '@total'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
{name: 'Author', mapping: 'ItemAttributes > Author'},
'Title',
'Manufacturer',
'ProductGroup',
// Detail URL is not part of the column model of the grid
'DetailPageURL'
])
});
store.load();
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{header: "Author", dataIndex: 'Author', sortable: true},
{header: "Title",dataIndex: 'Title', sortable: true},
{header: "Manufacturer", dataIndex: 'Manufacturer', sortable: true},
{header: "Product Group", dataIndex: 'ProductGroup', sortable: true}
],
sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
viewConfig: {
forceFit: true
},
height:210,
split: true,
region: 'north'
});
var ct = new Ext.Panel({
frame: true,
title: 'Book List',
layout: 'border',
items:
[
grid,
{
id: 'detailPanel',
region: 'south',
bodyStyle: {
background: '#ffffff',
padding: '7px'
},
html: 'Please select a book to see additional details.111111'
}
]
})
var w2 = new Ext.Window({
title:'用户信息',
width:500,
height:600,
items:ct
})
我要把上面这个ct放进一个window里面 但是界面不出来 但是如果 单独显示ct 就可以显示 我试验了一下适应为layout的关系 如果我把ct里面的layout去掉那么window就可以显示出来了看是 显示出来的样式不对, 不是上下结构的是,所以ct里面必须要有layout,这样我就矛盾了 放了layout就显示不出,不放样式又不多,大虾帮帮忙看看吧
var store = new Ext.data.Store({
// load using HTTP
url: 'sheldon.xml',
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'Item',
id: 'ASIN',
totalRecords: '@total'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
{name: 'Author', mapping: 'ItemAttributes > Author'},
'Title',
'Manufacturer',
'ProductGroup',
// Detail URL is not part of the column model of the grid
'DetailPageURL'
])
});
store.load();
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{header: "Author", dataIndex: 'Author', sortable: true},
{header: "Title",dataIndex: 'Title', sortable: true},
{header: "Manufacturer", dataIndex: 'Manufacturer', sortable: true},
{header: "Product Group", dataIndex: 'ProductGroup', sortable: true}
],
sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
viewConfig: {
forceFit: true
},
height:210,
split: true,
region: 'north'
});
var ct = new Ext.Panel({
frame: true,
title: 'Book List',
layout: 'border',
items:
[
grid,
{
id: 'detailPanel',
region: 'south',
bodyStyle: {
background: '#ffffff',
padding: '7px'
},
html: 'Please select a book to see additional details.111111'
}
]
})
var w2 = new Ext.Window({
title:'用户信息',
width:500,
height:600,
items:ct
})
我要把上面这个ct放进一个window里面 但是界面不出来 但是如果 单独显示ct 就可以显示 我试验了一下适应为layout的关系 如果我把ct里面的layout去掉那么window就可以显示出来了看是 显示出来的样式不对, 不是上下结构的是,所以ct里面必须要有layout,这样我就矛盾了 放了layout就显示不出,不放样式又不多,大虾帮帮忙看看吧
解决方案 »
- js怎么数组转成字符串啊~
- 想学开发网站,但是感到迷惑啊!
- javascript引用路径丢失“/”,怎么回事啊?再线等,谢谢了!!!
- IE11中window.open问题
- 100分求web打印问题!非常急。
- 哪里有js教程的下载、(内容相符就给分)
- 求:根据鼠标的移动,平滑移动web页面的代码
- 頁面隱含密碼
- jquery 获取 json数据里的日期 yyy-mm-dd {"nanos":0,"time":1413903530000,"minutes":58,"sec
- JS调用URL页面转向,控制器方法,点击按钮后报错
- 请问一个打开自适应子窗体,关闭子窗体刷新父窗体的问题
- 谁能用js写出仿新郎微博分页代码
w2.show()
w2.doLayout()