11 Replies Latest reply on May 30, 2006 4:31 AM by poonamsheth

    Flex/ColdFusion Integration

    jfillman Level 1
      I am quite new to Flex and am looking for someone who can point me to a working example or put together a very simple sample project that sends data to a CFC and one that receives data from a CFC. A Flex form would be a perfect example.
        • 1. Re: Flex/ColdFusion Integration
          I recently did a breeze presentation for the BACFUG on this topic that was recorded. Beyond that I posted the code for the example on http://www.flexcf.com which is a new site dedicated to helping cf developers learn flex.

          Link to the recording is here http://adobechats.breezecentral.com/p41466198/
          and my blog post with the code is here
          http://www.simb.net/blog/index.cfm/2006/4/19/BACFUG-Presentation--Simple-Flex-2-ColdFusion -Remoting-Example
          • 2. Re: Flex/ColdFusion Integration
            jfillman Level 1
            Is Remoting the only option? What about HTTP or AMF? My assumption is that Remoting and AMF require the Enterprise Data Service add on, which means I have to host the site on my own server? Prefer not to go that route.
            • 3. Re: Flex/ColdFusion Integration
              Simeon Level 1
              Using the RemoteObject tag is using AMF. And yes you can use httpServices as well. But AMF is much more efficient as a transfer protocal then http. Beyond that from cf you can use amf to return cfc objects and have them directly translated to AS object counterparts. This is not available through httpservice.

              Enterprise Data Services is not required to use RemoteObject. RemoteObject is avaialable using FlexBuilder or the free sdk. The only services that require EDS are data push and the data syncronization services. But your basic RPC (remote procedure call) methods that are currently available in flex 1.5 are avaiable in the free version of flex 2.0.

              Hope that helps.

              • 4. Re: Flex/ColdFusion Integration
                Simeon Level 1
                Well I suppose I should not say "The only services that require EDS" but the ones that pertain to this conversation

                • 5. Re: Flex/ColdFusion Integration
                  jfillman Level 1
                  I get this error.

                  [RPC Fault faultString="Could not find the ColdFusion Component simpleRemoting.cf.userService." faultCode="Server.Processing" faultDetail="Please check that the given name is correct and that the component exists."]

                  Where should this file reside to be found. I put it under the cf wwwroot directory.
                  • 6. Re: Flex/ColdFusion Integration
                    Simeon Level 1
                    The "dot" notation indicates folder path. So the userService.cfc should to inside a cf folder inside a simpleRemoting folder in your wwwroot. Or something like


                    it doesnt matter where ther swf ends up as long as its in the same wwwroot somwhere.

                    ps. This requires that you have the CF Mystic update installed and have set up Flex Builder to know where the "ColdFusion" destination actually is. Just FYI. not sure how "green" you are on the flex cf integration.
                    • 7. Re: Flex/ColdFusion Integration
                      jfillman Level 1
                      Yes I do have the Mystic update installed. I just installed Beta 3, and the ColdFusion connector and the CF Wizards. However, I'm pretty green with Flex.

                      I do have the cfc in a directory structure to match the "dot" notation.

                      Can the other files be in a subfolder of the wwwroot folder? If they have to be in the wwwroot folder, then that's the problem, otherwise, everything is correct.
                      • 8. Re: Flex/ColdFusion Integration
                        jfillman Level 1
                        So I just deleted everything and started over. Getting this error:

                        [RPC Fault faultString="java.lang.NullPointerException" faultCode="Server.Processing" faultDetail="null"]
                        at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
                        at mx.rpc::Responder/fault()
                        at mx.rpc::AsyncRequest/fault()
                        at ::NetConnectionMessageResponder/NetConnectionChannel.as$42:NetConnectionMessageResponder: :statusHandler()
                        at mx.messaging::MessageResponder/status()

                        Did Beta 3 cause this?
                        • 9. Re: Flex/ColdFusion Integration
                          well there is something called, JSP taglib . which is not available and there aren't plans to release it.

                          Yes, the JSP tag lib made creating a Flex app programmatically very easy, but there was significant overhead to compiling each app on each page request.

                          If what you want is to be able to use query string parameters or some other request-specific information in your Flex application, this can be accomplished using the instructions in the "Communicating with the browser" chapter.

                          well one more thing can be tried to use flex in a portal -environment, another option to include flex in my java portlet (based on Struts) than to use the JSP taglib

                          The integration of rich Flex applications in a flexible portal environment would seem like a good combination of technologies.

                          • 10. Re: Flex/ColdFusion Integration
                            poonamsheth Level 1
                            The integration of rich Flex applications in a flexible portal environment would seem like a good combination of technologies.

                            The benefits of using Flex in a portal environment include:

                            1. Improved User Experience

                            Flex can deliver portlets with a desktop-like user experience
                            * Rich user interface components: DataGrid, Tree, TabNavigator, Accordion, Charting components, sliders, etc.
                            * Rich user interface metaphors: drag-and-drop, expansion in place, etc.

                            2. No Page Refreshes

                            Refreshing a portal page is disorienting from the user point of view, and is also an expensive operation in terms of resources and bandwidth. Unlike traditional HTML-based portlets, Flex-based portlets can communicate with back-end systems without page refreshes.
                            3. Smart client-side data manipulation

                            * Once downloaded from the server, data can be manipulated at the client side. For example, a list of items retrieved from the client can be sorted or filter at the client-side. This leads to a more responsive user interface and reduced network traffic.
                            * Data can also be pushed from the server to the client using the XMLSocket API or the Flash Communication Server.
                            * If appropriate in the context of a specific application, data can also be saved at the client side.

                            4. Reduced network traffic

                            Because of the ability to communicate with back-end systems without page refreshes, and to manipulate data at the client-side, Flex-based portlets can also dramatically reduce the overall network traffic.
                            • 11. Re: Flex/ColdFusion Integration
                              poonamsheth Level 1
                              The Flex presentation server is deployed as a web application inside your application server. Flex can either be packaged as part of the Portlet web application, or deployed as a separate web application. The examples in this article have been tested in these two configurations.

                              there r articles/sample/example on link below: