Rally - Ошибка - hydrateModel не является функцией? - PullRequest
0 голосов
/ 26 апреля 2018

Вопрос: Я новичок в разработке Rally APP, пытаюсь создать простое приложение с выпадающим списком Release, когда выбранное заполняет сетку.

Однако, когда я выбираю значение, я получаю следующую ошибку, основанную на этой ошибке

1. Что это значит ? - Uncaught TypeError: this.store.hydrateModel не является функцией в constructor.initComponent ", и как решить эту проблему?

=============================================== =====================

App.js?_dc=0.59785698231437:43 Data:  [constructor]
    08:43:48.080 sdk-debug.js:185210 Uncaught TypeError: this.store.hydrateModel is not a function
        at constructor.initComponent (sdk-debug.js:185210)
        at constructor (sdk-debug.js:30211)
        at constructor.callParent (sdk-debug.js:4469)
        at constructor [as _componentConstructor] (sdk-debug.js:34291)
        at constructor.callParent (sdk-debug.js:4469)
        at constructor (sdk-debug.js:144823)
        at constructor.callParent (sdk-debug.js:4469)
        at constructor (sdk-debug.js:185132)
        at new constructor (sdk-debug.js:5100)
        at eval (eval at getInstantiator (sdk-debug.js:5720), <anonymous>:3:8)
            initComponent @ sdk-debug.js:185210
            constructor @ sdk-debug.js:30211
             callParent @ sdk-debug.js:4469
            constructor @ sdk-debug.js:34291
            callParent @ sdk-debug.js:4469
    constructor @ sdk-debug.js:144823
    callParent @ sdk-debug.js:4469
    constructor @ sdk-debug.js:185132
    constructor @ sdk-debug.js:5100
    (anonymous) @ VM20:3
    instantiate @ sdk-debug.js:5692
    (anonymous) @ sdk-debug.js:2303
    _loadData @ App.js?_dc=0.59785698231437:45
    fire @ sdk-debug.js:10046
    continueFireEvent @ sdk-debug.js:11447
    fireEventArgs @ sdk-debug.js:11425
    prototype.fireEventArgs @ sdk-debug.js:42297
    object.(anonymous function) @ sdk-debug.js:195692
    fireEvent @ sdk-debug.js:11411
    onListSelectionChange @ sdk-debug.js:149617
    object.(anonymous function) @ sdk-debug.js:195692
    fire @ sdk-debug.js:10046
    continueFireEvent @ sdk-debug.js:11447
    fireEventArgs @ sdk-debug.js:11425
    fireEvent @ sdk-debug.js:11411
    maybeFireSelectionChange @ sdk-debug.js:95171
    doSingleSelect @ sdk-debug.js:95145
    doSelect @ sdk-debug.js:94983
    selectWithEvent @ sdk-debug.js:94717
    onItemClick @ sdk-debug.js:95543
    fire @ sdk-debug.js:10046
    continueFireEvent @ sdk-debug.js:11447
    fireEventArgs @ sdk-debug.js:11425
    prototype.fireEventArgs @ sdk-debug.js:42297
    fireEvent @ sdk-debug.js:11411
    processUIEvent @ sdk-debug.js:96924
    handleEvent @ sdk-debug.js:96850
    (anonymous) @ VM60:7
    wrap @ sdk-debug.js:10800
==========================================================================

код ниже

enter code here


  Ext.define('CustomApp', {
            extend: 'Rally.app.App',
            componentCls: 'app',
            //specify the layout over here 
            defaults: { margin:10 },
           // layout: 'border', 

            items: [
                     { xtype:'container', itemId:'drop-downContainer',layout:'hbox' },   
                     { xtype:'container', itemId:'gridContainer',layout:'hbox' } 
                   ],

            //var userStories: undefined;

            launch: function() {
         enter code here       console.log('Entering the launch function');
                this._loadUserStores();
            },

            _loadUserStores: function()
                {   console.log("Entering the Load User Stories...");
                    var releaseComboBox = Ext.create('Rally.ui.combobox.ReleaseComboBox',{
                                            itemId: 'releaseDropDown',
                                            listeners: {
                                                    load: function(data,records,success){
                                                            console.log("Load is complete");

                                                        },
                                                    select: this._loadData,
                                                    scope: this
                                                            }

                                              }); 

                   this.down('#drop-downContainer').add(releaseComboBox);


                   },

            _loadData: function(myStore,data,success)
             {   console.log("Entering the onLoad Data...");
                 console.log("Store --",myStore);
                 console.log("Data: ",data);   

                  var datagrid= Ext.create('Rally.ui.grid.Grid',{
                                       store:  myStore,
                                       columnCfgs: ['Name', 'ReleaseStartDate"', 'ReleaseDate', 'ObjectID', 'State', 'PlannedVelocity']
                                        });

                   console.log("DataGrid is complete...");                     
                  //this.down('#gridContainer').add(datagrid);   




                 }   




        });

1 Ответ

0 голосов
/ 27 апреля 2018

Проблема, с которой вы столкнулись, заключается в том, что myStore - это не магазин, а выпадающий список.

Я бы проверил простую кнопку для выбора приложений для временных шкал: https://help.rallydev.com/apps/2.1/doc/#!/guide/timebox_filtering

А вот еще один пример, показывающий, как загрузить / обновить сетку на основе комбинированного фильтра: https://help.rallydev.com/apps/2.1/doc/#!/example/filterable-grid

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