开发者

update list selector dynamically in webos

i want to update list selector items dynamically .i am set the list selector widget like following

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);

what mistake i made here i don't know but it is not updating please help me


i got solution.i am not updating the model i am updating something else

that's way i got problem. i resolved this one by using this.selectorModel

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜