0
我已經在Ares中使用listselectors填充了兩個列表,例如列表ONE包含A,B,C,D和列表TWO包含E,F,G, H.如何預先篩選第二個列表,以便當從列表ONE中選擇項目A時,它會先過濾列表TWO以顯示F,G?在Palm webOS中使用Ares IDE預過濾多個列表選擇器列表
我到目前爲止的代碼是:
function FinalAssistant(argFromPusher) {
}
FinalAssistant.prototype = {
setup: function() {
Ares.setupSceneAssistant(this);
},
cleanup: function() {
Ares.cleanupSceneAssistant(this);
},
listSelector1Change: function(inSender, event) {
this.$.getListSelector2.choices["F"]
},
};
編輯補充:
我已經加入了回調函數和清理的方法,但它仍然沒有傳遞參數˚F& G.
代碼如下
FinalAssistant.prototype = {
setup: function() {
Ares.setupSceneAssistant(this);
this.controller.listen("listSelector1", Mojo.Event.listSelector1Tap, this.listSelector1Tap.bindAsEventListener(this));
},
cleanup: function() {
Ares.cleanupSceneAssistant(this);
Mojo.Event.stopListening(this.controller.listSelector1,Mojo.Event.listSelector1Tap,this.listSelector1Tap)
},
listSelector1Tap: function(inSender, event) {
switch (event.choices.label)
{
case 'A':
this.listModel2.choices = [{label: "F"}, {label: "G"}];
this.controller.modelChanged(this.listModel2);
break;
case 'B':
this.listModel2.choices = [{label: "H"}, {label: "I"}];
this.controller.modelChanged(this.listModel2);
break;
}
},
};
的魔日誌信息的錯誤說Mojo.Event.listen「目標」參數必須定義