3 Replies Latest reply on Mar 18, 2014 8:30 PM by xiaoyuandlg

    Change Label in Overview


      Hey Guys

      I have a problem which I hope is peanuts for you.


      I have a xml overview and I want to change its label dynamicly.

      I tried to put an function instead of the string at the initialization, put that did'nt worked, so I need to chage it at runtime.


      My code looks like this:

      <?xml version="1.0" encoding="utf-8"?>
      <vc:ManagedOverview label="Preferences" allowCallsFrom="[ch.test]"
        xmlns:mx="http://www.adobe.com/2006/mxml" type="{Preferable}" types="{[Preferable,Product,Component,Containable,ComponentCategory, ProductCategory]}"
        xmlns:vc="ch.marsdencatering.foodcomposer.viewcontrol.*" searchIndex="4"
        override public function onViewControlModelChanged(caller:IManagedView):void {
              if (caller is test) {
                   searchIndex =caller.currView;
                   if(searchIndex == 0){
                          //Change label here to "Likes"            
                  }else if(searchIndex == 1){
                          //Change label here to "Dislikes"



      Is that possible or should I try it on an other way?


      thanks for your help!!!