私は次のコードで作業しています:
launch: function() {
Rally.data.ModelFactory.getModel({
type: 'UserStory',
success: function(model) {
this.down('#gridContainer').add({
xtype: 'rallygrid',
model: model,
columnCfgs: [
{
text: 'ID',
dataIndex: 'FormattedID',
width: 75
},
{
text: 'Name',
dataIndex: 'Name',
width: 500,
listeners: {
click: this._showTasks,
scope: this
}
}
]
});
},
scope: this
});
}
ユーザーがグリッドからユーザー ストーリーをクリックすると、関数 _showTasks が呼び出されますが、クリックしたユーザー ストーリーの ID を取得するのに問題があります。console.log(this)を実行すると、ID がselectedという項目の配列に格納されていることがわかりますが、このプロパティへのパスはわかりません。また、最近選択されたユーザー ストーリーをグリッドから取得する簡単な方法があるのではないかという印象を受けました。
最終的な目標は、選択したユーザー ストーリーの子であるすべてのタスクを、別のラリーグリッドにリストするか、単に本体に直接出力することです。