0 Replies Latest reply on Apr 8, 2007 10:42 AM by AuroraCF

    Add second grid to CFWizard Master/Detail page


      I have a Master/Detail page generated from CFWizard utils for Company and Contact. All display no problem, when I add third table (Job) to create second grid, the CFwizard went into a loop and never finish generate new templates, I have to closed application to get out. I guess this is limitation or not allow in the wizard.

      So, I come up with different approach. I create a new Master/Detail page for Company and Job, then taking the Job grid adding to the Company.mxml page with all the passing Change event and key. I had spend day but still can't find way to solve this error.

      Here is the error:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at com.cfgenerated.views.masterdetail::CompanyMD/::addEditItem()
      at com.cfgenerated.views.masterdetail::CompanyMD/__masterView_editItem()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at com.cfgenerated.views.masterdetail::CompanyMD_master/::EditItem()
      at com.cfgenerated.views.masterdetail::CompanyMD_master/::getMasterQuery_result()
      at com.cfgenerated.views.masterdetail::CompanyMD_master/___Operation1_result()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      and my company.mxml code:

      <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.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;
      this.jobView.key = event.key;
      this.contactView.key = event.key;


      <ns1:CompanyMD_master left="6" top="0" id="masterView"
      <ns1:CompanyMD_detail left="240" top="-15"
      change="this.masterView.refreshList(event)" width="100%" height="286"/>
      <mx:TabNavigator x="255" y="279" width="100%" height="250">
      <mx:Canvas label="Contacts" width="100%" height="100%" >
      <ns1:CompanyMDcontact_detail id="contactView" x="0" y="0" change="this.masterView.refreshList(event)" width="100%" height="100%"/>
      <mx:Canvas label="Jobs" width="100%" height="100%" >
      <ns1:CompanyMDjob_detail id="jobView" x="0" y="0" change="this.masterView.refreshList(event)" width="100%" height="100%"/>
      <mx:Canvas label="Activities" width="100%" height="100%" id="activityView">

      Can this approach be done or impossible?