这是我的代码......
根本没有调用控制器..
var teamStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url:'/SmartScrum/TeamUseCase/TeamTrackerScreenGetAllTasksForProject.do'
}),
reader: new Ext.data.JsonReader({
fields: [{
name: 'TaskId',
mapping: 'taskId'
},{
name : 'StoryId',
mapping : 'storyId'
},{
name : 'Release Id',
mapping : 'releaseId'
},{
name : 'Sprint Id',
mapping : 'sprintId'
},{
name : 'Summary',
mapping : 'summary'
},{
name : 'Assigned To',
mapping : 'assignedTo'
},{
name : 'Status',
mapping : 'status'
},{
name : 'Estimated Start Date',
mapping : 'estimatedStartDate'
},{
name : 'Estimated End Date',
mapping : 'estimatedEndDate'
},{
name : 'Estimated Effort',
mapping : 'estimatedEffort'
},{
name : 'Actual Start Date',
mapping : 'actualStartDate'
},{
name : 'Actual End Date',
mapping : 'actualEndDate'
},{
name : 'Actual Effort',
mapping : 'actualEffort'
},{
name : 'Save',
mapping : 'saveFlag'
},{
name : 'Delete',
mapping : 'deleteFlag'
}],
root: 'tasks.taskListForProject',
id: 'id',
totalProperty: 'tasks.totalTaskForProject'
})
});
//teamStore.load();
var fm = Ext.form;
var Teamselection= new Ext.grid.RowSelectionModel({
singleSelect:true
});
var Teamcoloumn = new Ext.grid.ColumnModel(
[
new Ext.grid.RowNumberer(),
{
header: "Task Id",
dataIndex: 'Task Id',
width: 50
},{
header: "Story Id",
dataIndex: 'Story Id',
width: 50
},{
header: "Release Id",
dataIndex: 'Release Id',
width: 50
},{
header: "Sprint Id",
dataIndex: 'Sprint Id',
width: 50
},{
header: "Summary",
dataIndex: 'Summary',
width: 300,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Assigned To",
dataIndex: 'Assigned To',
width: 80
},{
header: "Status",
dataIndex: 'Status',
width: 80
},{
header: "Estimated Effort",
dataIndex: 'Estimated Effort',
width: 70,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Estimated Start Date",
dataIndex: 'Estimated Start Date',
width: 80,
hidden :true,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Estimated End Date",
dataIndex: 'Estimated End Date',
width: 80,
hidden :true,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Actual Effort",
dataIndex: 'Actual Effort',
width: 50,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Actual Start Date",
dataIndex: 'Actual Start Date',
width: 80,
hidden :true,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "Actual End Date",
dataIndex: 'Actual End Date',
width: 90,
hidden :true,
editor: new fm.TextField({
allowBlank: false
})
},{
header: "",
dataIndex: 'Save',
width: 40
},{
header: "",
dataIndex: 'Delete',
width: 40
}
]);
Teamcoloumn.defaultSortable = true;
var Teamdetailsgrid = new Ext.grid.EditorGridPanel({
id: 'Teamdetailsgridid',
store:teamStore,
height:100,
width:800,
cm:Teamcoloumn,
sm:Teamselection,
stripeRows: true,
bbar:new Ext.PagingToolbar({
store:teamStore,
items:['-',
{
tooltip:'Clear Filter',
iconCls:'clearfiltericon',
handler: function(){}},
'-','<span style="background:red;width:10px;height:12px;display:inline;"></span>','Running Late',
'<span style="background:lime;width:10px;height:12px;display:inline;"></span>','On Schedule',
'<span style="background:sandybrown;width:10px;height:12px;display:inline;"></span>','Cancelled',
'<span style="background:#045FB4;width:10px;height:12px;display:inline;"></span>','Completed'],
displayInfo: true,
displayMsg: 'Displaying Release {0} - {1} of {2}',
emptyMsg: "No Release to display"
})
});
alert("End of JS script");
//teamStore.load();
这里的teamdetails网格是在其他js中定义的......
答案 0 :(得分:0)
您必须调用网格存储加载方法。
Teamdetailsgrid.getStore().load()