Welcome!

ColdFusion Authors: Maureen O'Gara, Hovhannes Avoyan, Yakov Fain, Pat Romanski, Liz McMillan

Related Topics: ColdFusion, Adobe Flex

ColdFusion: Article

ColdFusion To Flex Super Wizard

Building Cool Applications

Notice that in the generated folder, there are model, view, and controller folders. Click on the Artist_Detailartists.as file to look at the ActionScript model (see Figure 16).

This ActionScript file was automatically generated. Are you blown away yet? Next, we will run the application (see Figure 17).

Select the Run > button, Flex Application, New button (see Figure 18).

Use the defaults here and press the Run button (see Figure 19).

By pressing on the List of Artists tab above, the user sees a list of artists. Users at this point can "automatically" create, read, update and delete artists from the database in real time. With Taylor Webb Frazier highlighted, select the update (pencil icon) button. (see Figure 20).

Notice a list of artists. We want to display a detail list of their artwork on this page as well. To do that we must re-run the wizard. Don't worry, you don't have to start again from scratch. Close your browser where the application was running (see Figure 21).

Select Ctrl-N, ColdFusion/Flex Application Wizard, Next (see Figure 22).

This time select the Lode ColdFusion/Flex Application Wizard Settings. Press Next (see Figure 23).

Keep the RDS settings the same and press Next (see Figure 24).

The wizard remembered our settings. To add the artist detail grid, press the Edit Detail Page button (see Figure 25).

Click on the art table twice to add the art table detail information. Notice the ARTISTID in the art table was used to tie the art table to the ARTISTID in the artists table. Uncheck the MEDIAID and ISSOLD checkboxes under the Display column to not display those fields. Press Save. Press Finish. Run the application (see Figure 26).

Taylor Webb's Detail information is displayed in edit mode. Notice the bottom of the page displays Taylor Webb's artwork, allowing the user to add and delete items.

The last page we are going to add will contain a Master/Detail list of Art for Sale. Select CTRL-N to start the wizard, Coldfusion/Flex Application, Next, Load ColdFusion/Flex Application Settings, Next, Next (see Figure 27).

This time we are going to add the Master/Detail page to display and edit the Art for Sale.

Enter Art For Sale in the Name field and select Master/Detail page type, then select Edit Master Section (see Figure 28).

To list the names of the artists, double-click the art table and select ARTID and ARTName. Uncheck the ARTID Display column so it won't be displayed. Press Save (see Figure 29).

Press the Detail Section tab and the Edit_Detail Section Button (see Figure 30).

For the detail page we again select the art table. Under the Input Control column for ARTISTID we are going to select a ComboBox that will list the artist names. To get the names we use a sub-select by pressing the sub-select button (see Figure 31).

Here we select the artists table. We select the ARTISTID, FIRSTNAME and LASTNAME fields, but uncheck the ARTISTID under the Display column to only display the artists first and last name. Press Save (see Figure 32).

Change MEDIAID Input Control to ComboBox and select the sub-select button on the right (see Figure 33).

Double-click the media table. Select the MEDIAID and MEDIATYPE. Uncheck the MEDIAID Display checkbox. Press Save. (see Figure 34).

Lastly, change the Input Control for ISSOLD to CheckBox. Press Save (see Figure 35)

Drag the Art For Sale page to the Navagation Tree (see Figure 36).

Press Next (see Figure 37).

Press Finish. Run the program (see Figure 38).

When users select the Art for Sale tab, they will see a list of the art being sold that they can add to and delete items from along with the detail of the selected piece on the right (see Figure 39)

The user can select information by artist name (see Figure 40).

The user can select information by media type.

To recap, we just learned how to use the CF/Flex Super Wizard, supplied with ColdFusion MX 7.0.2 and loaded into FlexBuilder 2.0, to create a Master, Detail and Master/Detail page using Flex, ColdFusion and Flash, "automatically." The ColdFusion/Flex Wizard is just one of the the ColdFusion extensions included in ColdFusion MX 7.0.2. Check out the others too.

More Stories By Mary McDonald

Mary McDonald has served the last four years as the Northern Indiana Adobe Users Group Manager (see www.ninmug.org), has attended many conferences including CFUNITED, MAX, MXNorth and TodCon. Out of her 16 years working as a software developer, Mary has worked the last 6 years with ColdFusion, SQL, Flash, and Flex and is a Certified 5.0 ColdFusion Developer. Mary's other interests include music, photography, traveling, dogs, and most recently Tai Chi.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
CFDJ News Desk 10/30/06 05:26:29 PM EST

ColdFusion Extensions for Flex, included in ColdFusion MX 7.0.2, enable Flex Builder 2.0 developers to automate the more mundane tasks like CRUD (creating, reading, updating and deleting records) by creating ColdFusion components, ActionScript class files, and code to invoke a Web Service.