Перенаправление ext js не работает должным образом - PullRequest
0 голосов
/ 30 декабря 2010

это мой код ...

он вообще не вызывает контроллер ..

   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 ...

1 Ответ

0 голосов
/ 30 декабря 2010

Вы должны вызвать метод загрузки хранилища сетки.

Teamdetailsgrid.getStore().load()
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...