0

我想动态更新列表选择器项目。我设置了列表选择器小部件,如下所示

this.ConversionToNumaric= [    {label:$L('One'), value:"1", secondaryIcon:''},
              {label:$L('two'), value:"2", secondaryIcon:''}, 
              {label:$L('three'), value:"3" , secondaryIcon:''}
               ]


this.controller.setupWidget('listSelectorConversionToNumaric', {labelPlacement:'left',label: $L('To'), choices: this.ConversionToNumaric, modelProperty:'currentConversionToNumaric'}, this.selectorsModel);

the above code i am using for setup the widget 

this.ConversionToNumaric= [    {label:$L('four'), value:"4", secondaryIcon:''},
              {label:$L('five'), value:"5", secondaryIcon:''}
                           ]
                               ]
    this.currentConversionToPower.choices=this.ConversionToNumaric;                            
    this.controller.modelChanged(this.currentConversionToNumaric);

我在这里犯了什么错误我不知道但它没有更新请帮助我

4

1 回答 1

0

我得到了解决方案。我没有更新模型我正在更新其他东西

这就是我遇到问题的方式。我通过使用 this.selectorModel 解决了这个问题

this.selectorsModel=this.ConversionToNumaric; this.controller.modelChanged(this.selectorsModel);

于 2010-04-21T08:15:40.930 回答