Using BlazeDS Version 4 To Integrate A Flex Application With A Java Backend Built With Flash Builder

Introduction

Adobe and SpringSource are working together to make it easier for Java developers to use Java and Spring on the backend and Flex-Adobe's rich internet application framework [refer 2]--on the frontend.  Adobe has an open source project called BlazeDS [refer 8] that provides the plumbing to enable a Flex application to communicate data with a Java application running on a server.  The new version of the Flex IDE--Flash Builder 4 [refer 3]--provides extensive data wizards that can auto detect the services a Java application is exposing to a remote application such as the Flex client.  SpringSource has created a Spring Flex module [refers 1 and 6] that enables Java developers to use Spring to set up the BlazeDS plumbing on the server side and to use XML or annotations to mark which classes and methods should be available to be called by the Flex application.

[More]

Using BlazeDS to Connect Flex to A Java Class That Returns Data From A Database

Introduction

This is part 4 in my series on using Flex, BlazeDS, and Java. In this part I explain how I used Java to provide my Flex application with a collection of objects that were populated by records from a database. BlazeDS provides the plumbing that enables Flex to communicate with the Java classes on the back end. If you've not yet read the previous posts in this series, you should review them first.

Steps to Set Up This Example

You can view this example online. Right click on the application to view the source code.

I created a series of Java classes that connected to my database, executed a query, and iterated over the result set. For each record I created a Speaker object (Speaker is a separate class with firstName, lastName, and title instance fields). Each Speaker object is added to an ArrayList, which is returned to the caller.

[More]

Using BlazeDS to Send User-Defined Data Types (Data Transfer Objects) from Java to Flex

Introduction

This is part 3 of my series on how to use BlazeDS to enable Flex to communicate with Java on the backend. If you've not yet read parts 1 and 2, you should review them before continuing. In this blog entry I'll explain how I created an example to have Java send a user-defined data type (a data transfer object) and a collection of user-defined data types to the Flex application.

[More]

Using BlazeDS to Enable Flex to Send Data To A Java Class

Introduction

This blog entry continues my exploration of how to use Flex, Java, and BlazeDS together. In this tutorial I explain how to send data from Flex to a Java class.

[More]

Using Flex, BlazeDS, and Java Together - A Simple Tutorial

Introduction

When you want to directly use Java classes to provide data to a Flex application you need to add some additional plumbing that enables Flex to "talk with" the Java classes. Flex comes ready to rock with ColdFusion Components, but doesn't have everything it needs to communicate directly with Java classes exposed by a J2EE or servlet container such as Tomcat.

[More]

Handling ColdFusion Custom Exceptions In Flex

Introduction

There may be occasions when a CFC function being used by Flex needs to throw a custom exception to alert the caller of the function that some problem has occurred during the function (1). If you're using Flex to call a CFC function that may throw an exception then you need a way to handle the exception in Flex (6) and display an appropriate error message to the user. This blog entry desribe a technique I use to throw an exception from a CFC function and then display an exception message in Flex to the user. Flex automatically translates the attributes of the ColdFusion cfthrow tag (3) to property values of the Flex Fault class (8).

[More]

Flex - Printing A DataGrid That Spans Multiple Printed Pages

Introduction

I recently needed to add a print capability to a Flex application to allow the user to print the results being displayed in a DataGrid control. The print out would need to span multiple pages since the number of rows displayed in the DataGrid exceeds the height of one printed page. Not having had to print a DataGrid's content before I consulted the Flex 3 documentation. The developer's guide (1,2) provides a good explanation of how to print (1) and shows an example of how to print a DataGrid that will span multiple pages (2). However, the multipage example (2) is a bit complex, has some convoluted logic (uses an endless loop) and is hard to follow since it makes use of several custom components to provide a header and footer to the printed pages. So I thought a simpler example and explanation of just printing the DataGrid on multiple pages might be beneficial.

[More]

An Introduction to Integrating ColdFusion, ColdSpring, and Flex 3

I am presenting how to use ColdFusion, ColdSpring, and Flex together to the Kansas City Adobe RIA User Group on March 25, 2008. ColdSpring is a framework that helps developers manage the dependencies between ColdFusion Components (CFCs). ColdSpring has a feature that enables it to create a remote facade for any of the CFCs that it manages. A Flex application can connect to the remote facade CFC to get data, save information, or to perform other server side operations. My presentation provides an introduction on how to use ColdSpring to manage dependencies and how to enable ColdSpring to create remote facade CFCs.

Using the links below you can download a copy of the presentation and the example projects. In the first part of the presentation, I explain how to setup the example projects and the database they use.

[More]

Displaying Grouped Data Provided By ColdFusion in the Flex 3 AdvancedDataGrid

Introduction

ColdFusion makes it easy to display query results grouped by one of the query result columns on a web page. You just need to use the group attribute (1) of the cfoutput tag. Showing grouped data that was provided by a ColdFusion query in Flex 2 was not so easy. However, with the introduction of the AdvancedDataGrid component (2) in Flex 3, it's now simple to showed grouped data that initially came from a ColdFusion query.

[More]

XML And The Flex LinkBar's DataProvider Attribute

I was recently working on a Flex project where I wanted to use the LinkBar component (1). However, the data I needed to use that included the label values for the LinkBar's LinkButtons was in an XML file. As best I can tell, the LinkBar component is one of the few Flex components whose dataProvider attribute doesn't accept XMLList or XMLListCollection. According to reference 2, the dataProvider value for a LinkBar component must either be a ViewStack component or an array.

[More]

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner