2014-07-20 1 views
1

의 숨김 필드를 표시하면 SDK의 UI 구성 요소에 표시되지 않습니다. 예를 들어 _ref이 숨김 필드이므로 을 _ref의 dataIndex 열로 만들 수 없습니다. 또한 숨겨진 사용자 정의 필드가 있지만 실제로 열을 사용하여 rallygrid에 열을 만들어야합니다.랠리 SDK에서 랠리에서 필드가 '숨김'인 경우 UI 구성 요소

SDK 소스를 살펴본 결과 SDK의 UI 구성 요소에서 제거 된 것을 알고 있으므로이 문제를 해결할 수있는 대안이나 해킹을 찾고 있습니다.

나는이 문제 here

답변

1

custom store을 기반으로 그리드의 _ref을 포함 할 수 있습니다에 댓글을 달았습니다. 나는 각 레코드의 _ref 값으로 참조 열 채우기 위해 사용자 정의 데이터 그리드 example 수정 :

enter image description here

Ext.define('CustomApp', { 
    extend: 'Rally.app.App', 
    componentCls: 'app', 
    items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'}, 
    launch: function() { 
     Ext.create('Rally.data.wsapi.Store', { 
      model: 'userstory', 
      autoLoad: true, 
      listeners:{ 
       load: this._onDataLoaded, 
       scope: this 
      }, 
      fetch: ['FormattedID', 'Name', '_ref'] 
     }) 
    }, 
    _onDataLoaded: function(store,data){ 
     var records = _.map(data, function(record){ 
      return Ext.apply({ 
       Ref: record.get('_ref') 
      }, record.getData()); 
     }); 
     this.add({ 
      xtype: 'rallygrid', 
      showPagingToolbar: false, 
      showRowActionsColumn: false, 
      editable: false, 
      store: Ext.create('Rally.data.custom.Store', { 
       data: records 
      }), 
      columnCfgs:[ 
       { 
        xtype: 'templatecolumn', 
        text: 'ID', 
        dataIndex: 'FormattedID', 
        width: 100, 
        tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') 
       }, 
       { 
        text: 'Name', 
        dataIndex: 'Name' 
       }, 
       { 
        text: 'Reference', 
        dataIndex: 'Ref', 
        flex: 1 
       } 
      ] 
     }) 
    } 
}); 
+0

이 방법은 나 사용자 정의 필드 열을 표시 할 수 있도록 않았다을 감사 – spsteffl