2010-12-30 8 views
0

これは私のコードで動作していない...EXT JSリダイレクトが正しく

それはすべてのコントローラを起動されていません。..

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(); 

をここにグリッドが他のjsで定義されているteamdetails ...

+0

あなたはどこにでもロードを呼び出していませんか? – Lloyd

答えて

0

グリッドストアの読み込みメソッドを呼び出す必要があります。

Teamdetailsgrid.getStore().load() 
+0

まあ、実際にはOPのコードは2回です: '//teamStore.load();'これはコメントを外してもあなたの提案と同じように動作します。多分、そのコードが他の人から書かれているのかもしれないし、おそらく彼はすでにそれを試していて、どちらもうまくいきませんでした。 –

+0

彼は明確にする必要があります。 – Lloyd