3 Replies Latest reply on May 23, 2007 8:49 AM by AuroraCF

    Refresh tabNavigation tab with masterview record selected


      Can some one please review my code and help me how I can refresh my tab selection? I have a master view, detail view and tab view (there are 3 grids in each tab). When I select a record on master view, detail view and first tab display data fine. But when I select the next tab to view additional data for that same record, not thing display. The only way for it to display/re-fresh is if I select different record from masterview then data will display in second tab. But then again, if I click back to the first tab, the data of the first selected record from masterview still sitting there.

      Please help me how I can refresh the tab as I selected it should re-fresh base on the selected record of my masterview. here is the code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml"
      width="100%" height="100%"

      import mx.utils.ObjectUtil;
      import mx.controls.Alert;
      import mx.core.UIComponent;
      import mx.core.Application;
      import com.adobe.windowedApplication.events.SelectionEvent;
      import com.adobe.windowedApplication.managers.WindowManager;

      private var _key:Object;

      public function get key():Object
      return this._key;
      public function set key(key:Object):void
      this._key = key;

      private function addEditItem(event:SelectionEvent):void
      this.detailView.key = event.key;
      private function gridItem(event:SelectionEvent):void

      if (companyTab.selectedIndex == 0){

      this.jobView.key = event.key;
      }else if (companyTab.selectedIndex == 1){

      this.contactView.key = event.key;
      }else if (companyTab.selectedIndex == 2) {

      this.actView.key = event.key;

      <mx:HBox top="0" width="250" height="410">
      id="masterView" tabIndexChange="this.masterView.refreshList(event)"

      <mx:HBox top="-15" left="240" right="186">
      change="this.masterView.refreshList(event)" width="100%" height="283"/>

      <mx:TabNavigator top="240" left="256" right="200" width="100%" height="230" id="companyTab" backgroundColor="#98d6f3" >
      <gdview:gdAjobs id="jobView" label="Jobs"
      change="this.masterView.refreshList(event)" width="100%" height="100%"/>
      <gdview:gdAcontacts id="contactView" label="Contacts"
      change="this.masterView.refreshList(event)" width="100%" height="100%"/>
      <gdview:gdAacts id="actView" label="Activities"
      change="this.masterView.refreshList(event)" width="100%" height="100%"/>

      Appreciated for any help,