On 1/23/07, Steve Milburn <[EMAIL PROTECTED]> wrote:
> In short, the article states "You cannot pass ColdFusion variables to Flex
> applications
> directly. You must encode them in XML first". Anyway, I am working with
> Remote
> Object (as you suggested), and I am having no problems doing what I need to
> do.
> I just thought it was odd that I came across 2 conflicting articles like
> that, and
> thought I was missing something.
I believe that the confusion is resulting from the fact that the
articles do not so much "conflict" as describe different approaches to
getting data from ColdFusion to Flex. The reason that the article you
mention talks about "[encoding the variables] in XML first" is that
the data from ColdFusion is in this case being returned through the
equivalent of a screen scrape ("go to the web page x and put the
displayed page into variable y"). The easiest way to handle data so
retrieved is to have page x simply be a page which displays XML. The
ColdFusion variables in this case must be included in the XML
displayed because, as with your web browser, no internal CF variable
structure is returned when a page is displayed. In this case there is
no ColdFusion<->Flex "connection," Flex is simply loading a web page
which happens to be created through ColdFusion.
Using remoting, on the other hand does allow ColdFusion and Flex to be
truly connected and aware of each other. The remoting gateway
provides a Flex-aware connection for accessing data through ColdFusion
which allows for the conversion between types and a rich interaction
not allowed by the HTTPService access style.
Adam