Friday, March 19, 2010    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Jan 2004 >>
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Search

Categories
 • Acrobat (3) [RSS]
 • Adobe (90) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (66) [RSS]
 • AdobeMAX09 (39) [RSS]
 • AdobeMAX10 (1) [RSS]
 • AIR (219) [RSS]
 • Appearances (191) [RSS]
 • Books (72) [RSS]
 • CFEclipse (15) [RSS]
 • ColdFusion (1381) [RSS]
 • Data Services (34) [RSS]
 • Fish Tank (5) [RSS]
 • Flash (197) [RSS]
 • Flex (498) [RSS]
 • Home Automation (5) [RSS]
 • Jobs (116) [RSS]
 • JRun (14) [RSS]
 • Labs (43) [RSS]
 • LiveCycle (34) [RSS]
 • MAX (232) [RSS]
 • Mobile (120) [RSS]
 • Regular Expressions (17) [RSS]
 • RIA (21) [RSS]
 • SQL (40) [RSS]
 • Stuff (536) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (162) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • Mark Doherty
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Day : January 12, 2004 / Main
January 12, 2004

Flex Example: ColdFusion Generated Flex

My last Flex blog post demonstrated Flex as a ColdFusion client, a n-tier application using ColdFusion as the logic layer and Flex as the presentation layer. Here is another way to integrate Flex and ColdFusion; dynamically generated Flex.

Click on URL http://www.forta.com:8100/cf/flex/tree.cfm to see an example of a Flex tree. It is a really simple example, and mildly impressive at best. So why am I posting this? Look at the URL, it is a .cfm URL, not a .mxml url.

Christophe Coenraets posted a really useful entry on using the Flex JSP Tag Library so as to be able to generate MXML inline within a JSP page. (See http://www.markme.com/cc/archives/004021.cfm).

Can ColdFusion users do the same? Absolutely, that's exactly what the tree example is doing. ColdFusion can import and invoke JSP tags, and the Flex JSP tags are no exception.

Here is the CFML code used in this example:

<!--- Import Flex JSPs --->
<CFIMPORT TAGLIB="/WEB-INF/lib/flex-bootstrap.jar" PREFIX="mm">

<!--- Create tree XML --->
<CFSAVECONTENT VARIABLE="tree">
<node label='Option 1'>
<node label='Option 1.1'/>
<node label='Option 1.2'/>
</node>
<node label='Option 2'/>
</CFSAVECONTENT>

<!--- Page --->
<HTML>
<BODY>

<H1>Flex Embedded in ColdFusion</H1>

<!--- Start of MXML --->
<mm:mxml>
<mx:Application width="200" height="200" xmlns:mx="http://www.macromedia.com/2003/mxml">
<!--- Tree --->
<mx:XML id="myTree">
<!--- CF tree data --->
<CFOUTPUT>#tree#</CFOUTPUT>
</mx:XML>
<mx:Tree widthFlex="1" heightFlex="1" dataProvider="{myTree}"/>
</mx:Application>
</mm:mxml>

</BODY>
</HTML>

In this example I hard-coded the menu contents to keep things simple, but you can imagine using queries or CFCs or any CFML code here. This type of integration, being able to use both CFML and MXML together, makes it really easy to create ColdFusion/Flex applications.


Macromedia the "Most Blog-Friendly Company in America"

The Salt Lake Tribune is running a story (by a Boston Globe columnist) on corporate bloggers, starting with the tale of a Microsoft employee who was fired for blogging "a photo of a pallet of Apple Macintosh computers being delivered to Microsoft headquarters". The story goes on to suggest that "Perhaps the most blog-friendly company in America is Macromedia, a multimedia software producer based in San Francisco.", and mentions Mike Chambers' blog as an example. Full story at http://www.sltrib.com/2004/Jan/01122004/business/128240.asp.


ZDNet: Flash an Alternative for Video and Rich Content

ZDNet is running a story on the emergence of Flash as an alternative to Windows Media Player, RealNetworks RealPlayer, and Apple's QuickTime. Nothing shockingly new, but useful perspective nonetheless. Story is at http://zdnet.com.com/2100-1107_2-5139102.html.

  © Copyright 1997-2009 Ben Forta, All Rights Reserved