2012-07-11 73 views
0

如果我有一個PortfolioItems rallygrid,並且在列配置中包含PercentDoneByStoryPlanEstimate,我會按預期得到進度欄。但是當我將鼠標懸停在進度條上時,我沒有看到帶有我在拉力賽中看到的額外信息的工具提示。Rally App SDK 2.0:如何獲得工具提示

如何獲取應用程序中顯示的工具提示?

示例代碼:

Rally.onReady(function() { 
     Ext.define('CustomApp', { 
      extend: 'Rally.app.App', 
      componentCls: 'app', 

      launch: function() { 
       Rally.data.ModelFactory.getModel({ 
        type: 'PortfolioItem', 
        success: function(model) { 
         this.grid = this.add({ 
          xtype: 'rallygrid', 
          model: model, 
          columnCfgs: [ 
           'FormattedID', 
           'Name', 
           'PercentDoneByStoryPlanEstimate' 
          ] 
         }); 
        }, 
        scope: this 
       }); 
      } 
     }); 

     Rally.launchApp('CustomApp', { 
      name: 'Grid Example' 
     }); 
    }); 

回答

0

你只需要指定一個viewConfig並添加 'rallypercentdonetooltip' 插件像這樣:

success: function(model) { 
    this.grid = this.add({ 
     xtype: 'rallygrid', 
     model: model, 
     columnCfgs: [ 
      'Name', 
      'FormattedID', 
      'PercentDoneByStoryPlanEstimate' 
     ], 
     viewConfig:{ 
      plugins:[ 
       {ptype:'rallypercentdonetooltip'} 
      ] 
     } 
    }); 
相關問題