1

ユーザーストーリー用の簡単なwsapidatastoreを作成すると、次のように機能します。

Ext.create('Rally.data.WsapiDataStore', {
            model: 'User Story',
            autoLoad: true,
            listeners: {
                load: this._onArtifactsLoaded,
                scope: this
            }
        });

しかし、アーティファクトに変更すると、エラーが発生します。

Ext.create('Rally.data.WsapiDataStore', {
            model: 'Artifact',
            autoLoad: true,
            listeners: {
                load: this._onArtifactsLoaded,
                scope: this
            }
        });

コンソールによると:

Uncaught TypeError: Cannot call method 'replace' of undefined sdk-debug.js:104071
Ext.define._buildTypeInfo sdk-debug.js:104071
Ext.define.getModels sdk-debug.js:104025
Ext.Array.each sdk-debug.js:956
Ext.define.getModels sdk-debug.js:104024
Ext.define.getModel sdk-debug.js:103985
Ext.define.load sdk-debug.js:104379
(anonymous function)
4

1 に答える 1

0

モデルファクトリーにエラーがあるようです。

回避策が必要な場合は、このコード行を使用してアーティファクトを正当なタイプとして追加できます。

Rally.data.ModelTypes.types.artifact = 'artifact';
于 2012-06-19T21:36:05.347 に答える