tags:

views:

86

answers:

1

Hi

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

A: 

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

Aswan