3 Replies Latest reply on Oct 15, 2007 8:32 PM by Martin-R

    Coldfusion CFCs Not Returning Data

    Martin-R Level 1
      OK. I've been pulling my hair out over this for about two weeks. I
      generated a master page and a detail page using the ColdFusion
      Application Wizard in FB3 beta 2. (The behavior below also happens
      in FB2.01)

      The detail page has nine comboboxes, five date fields, one textarea,
      and one checkbox. When I select a record from the master datagrid and
      click the edit button (or just double-click the record in the master
      grid), a little more than half the time only the information in the
      comboboxes shows up. All other fields are the default fields for a
      new record.

      I know it's reading the data because the comboboxes are set to the
      correct selections for the record chosen. It seems to happen more
      often when there is a lot of text in the textarea.

      This is driving me nuts! And, it's very frustrating for the endusers
      who are testing the app. Has anyone seen this behavior before?

      I'm running CF 8 Standard with cumulative hotfix 1. The database is
      on SQL 2005.

      TIA,
      Randy

        • 1. Re: Coldfusion CFCs Not Returning Data
          ebelair
          Can we see some your code? What exactly are you returning from the CFC, and in what is the return type?
          • 2. Re: Coldfusion CFCs Not Returning Data
            Martin-R Level 1
            OK. The relevant code is attached.

            As you can see, this is pretty much just the code generated by the ColdFusion Application Wizard. It's nothing out of the ordinary.

            ~randy

            • 3. Re: Coldfusion CFCs Not Returning Data
              Martin-R Level 1
              I solved this by rearranging some of the statements in the code. I don't think I should have had to do this since the code was generated by the Coldfusion Application Wizard, but I had to change it anyway.

              I changed this code:

              public function set key(key:Object):void {
              this._key = key;
              getItem();
              }

              private function initComponent():void {
              this.detailObject = new DetailComplaint();
              this.referenceManager.infoIDLookup();
              this.referenceManager.statIDLookup();
              this.referenceManager.dispIDLookup();
              this.referenceManager.ctIDLookup();
              this.referenceManager.refIDLookup();
              this.referenceManager.unitIDLookup();
              this.referenceManager.resIDLookup();
              this.referenceManager.iaIDLookup();
              this.referenceManager.investIDLookup();
              }

              to this:

              public function set key(key:Object):void {
              this._key = key;
              }

              private function initComponent():void {
              this.detailObject = new DetailComplaint();
              this.referenceManager.infoIDLookup();
              this.referenceManager.statIDLookup();
              this.referenceManager.dispIDLookup();
              this.referenceManager.ctIDLookup();
              this.referenceManager.refIDLookup();
              this.referenceManager.unitIDLookup();
              this.referenceManager.resIDLookup();
              this.referenceManager.iaIDLookup();
              this.referenceManager.investIDLookup();
              getItem();
              }

              Moving the getItem() call to the initComponent() function solved the timing problem between rendering the components on the screen and getting the data back from the remote object.

              ~randy