2 Replies Latest reply on Sep 5, 2007 2:51 PM by Newsgroup_User

    I need help: sending an arraycollection to coldfusion

    enfantterrible-tijzQ7 Level 1
      from the limited docs that I've been able to read, it is my understing that if you send CF an arraycollection from Flex 2 that CF should see it as a query object but when I send my CFC an arraycollection with the code:
      var test2:ArrayCollection = new ArrayCollection();
      test2 = appData.ufSearchList;
      prepareUfList.saveuflist(currentUser.gSession.owner, currentUser.gSession.userid, catalogueName_ti.text, test2);

      I get the following error:
      The argument LSTVALUES passed to function saveuflist() is not of type query

      Can anyone tell me what I'm doing wrong?

      Thanks for the help!!!
        • 1. Re: I need help: sending an arraycollection to coldfusion
          enfantterrible-tijzQ7 Level 1
          To continue the saga and in the hopes of assisting other lost souls in the same predictament this is what I've been able to figure out:
          Contrary to what I understand from reading the Remoting Docs, when I send an array collection to CF CF receives the ArrayCollection as an array not a query.

          I access the array using <cfargument name="lstValue" type="array">

          and I acces the array value with #arguments.lstValue[x].fieldname#

          Carlos
          • 2. Re: I need help: sending an arraycollection to   coldfusion
            Level 7
            enfantterrible wrote:
            > To continue the saga and in the hopes of assisting other lost souls in the same
            > predictament this is what I've been able to figure out:
            > Contrary to what I understand from reading the Remoting Docs, when I send an
            > array collection to CF CF receives the ArrayCollection as an array not a query.
            >
            > I access the array using <cfargument name="lstValue" type="array">
            >
            > and I acces the array value with #arguments.lstValue[x].fieldname#
            >
            > Carlos
            >

            That is correct, what you may have misinterpreted is that the
            translation occurs the other direction. If you send a query from
            ColdFusion to Flex, Flex is going to interpret it as an ArrayCollection
            since Flex does not have a 'Query' object. But the translation does not
            happen in reverse, once an Array it is going to stay an Array.