Sorry, I gave you instructions on the FDS CRM sample without
the CF backend.
Here are the steps to getting the Contact Manager application
from
http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1.htmlup and running:
1. Download and Install Flex Data Services 2 Express to the
built-in web server on port 8700 (default installation)
http://www.adobe.com/go/tryflex2. Download and install ColdFusion MX 7.02 to the built in
web server on port 8500
http://www.adobe.com/go/trycoldfusion3. Download and install Flash Player 9
http://www.adobe.com/go/getflashplayer4. Download and install Flex Builder 2 (for the ColdFusion
Extensions)
http://www.adobe.com/go/tryflex5. Download contact_sample.zip
http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1.html6. Unzip contactmgr.mxml, Hourglass.mxml, mini.mxml,
wait.png, and Contact.as to C:\fds2\jrun4\servers\default\samples
and
be sure “Use folder names” is checked!7. Open C:\fds2\resources\config\services-config.xml in your
favorite text editor
8. Select and copy:
<!-- ColdFusion specific RTMP channel -->
<channel-definition id="cf-dataservice-rtmp"
class="mx.messaging.channels.RTMPChannel">
<endpoint uri="rtmp://{server.name}:2048"
class="flex.messaging.endpoints.RTMPEndpoint"/>
<properties>
<idle-timeout-minutes>20</idle-timeout-minutes>
<serialization>
<!-- This must be turned off for any CF channel -->
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<!-- ColdFusion specific HTTP channel -->
<channel-definition id="cf-polling-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint uri="
http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling"class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<serialization>
<!-- This must be turned off for any CF channel -->
<instantiate-types>false</instantiate-types>
</serialization>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>8</polling-interval-seconds>
</properties>
</channel-definition>
9. Open
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex\services-config.xml
in your favorite text editor
10. Paste the copied text just under the last
</channel-definition> tag and above the closing
</channels> tag
11. Save
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex\services-config.xml
12. Open
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex\data-management-config.xml
in your favorite text editor
13. copy and paste the following to just under the last
<adapter-definition id> tag and just above the
</adapters> tag:
<adapter-definition id="coldfusion-dao"
class="coldfusion.flex.CFDataServicesAdapter"/>
14. Open C:\fds2\resources\config\data-management-config.xml
in your favorite text editor
15. Select and copy:
<!-- ======================================== -->
<!-- ColdFusion Sample - Contact sample application
-->
<!-- ======================================== -->
<destination id="cfcontact">
through all of this code (roughly lines 288-395):
<!--
Determines whether order is important for this filled
collection. Allows for
performance optimization when order is not important.
Optional. Default value is true.
-->
<ordered>true</ordered>
</fill-method>
</server>
</properties>
</destination>
16. Paste the copied text to
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex\data-management-config.xml
just under the last </destination> and just above the
</service> tag
17. Unzip Contact.cfc, ContactDAO.cfc, ContactAssembler.cfc,
test.cfm and contact.mdb to C:\CFusionMX7\wwwroot (Built-in web
server root on port 8500) and
be sure “Use folder names” is checked!18. Logon to the Coldfusion Administrator
19. Create a datasource called FlexDataServices and point it
to
C:\CFusionMX7\wwwroot\contact_sample\samples\contact\db\contact.mdb
(Be sure the datasource verifies ok)
20. Create a mapping called samples mapped to
C:\CFusionMX7\wwwroot\contact_sample\samples
21. Test the Coldfusion side of the application by requesting
http://{server_name}:8500/contact_sample/samples/contact/testContactAssembler.cfmYou should see the following output:
Output from Fill
8 records
Tom Jordahl
Joe Doe
Randy Crew
Testing Man
Jim Dandy
Bill Sahlas
William Chan
Jack Sahlas
22. Open
C:\fds2\jrun4\servers\default\samples\contact_sample\dataservice\contact\contactmgr.mxml
in your favorite text editor.
23. Find this line of code: ds = new
DataService("cfcontact");
24. Change cfcontact to cfcontact-default
25. Save and exit all edited files
26. Start Flex by typing “jrun –start
default” at c:\fds2\jrun4\bin
27. Request the Contact Manager sample by requesting
http://{server_name}:8700/samples/contact_sample/dataservice/contact/contactmgr.mxml28. You should see the Contact Manager application data