Flex Grocer Finished Project Online
I know there are a bunch of us Flex newbies using the TFS book to learn Flex 2. From the start, I wanted to work on this project in my existing ColdFusion Server Developer set-up. Adding another instance of the server to my system just scared the hell out of me; I think I got it more or less figured out.
To the gurus, this is child's play, but to me, it's terrifying rocket science; I know there are others in the same boat I am, so here I am describing what I did, hoping it will help other beginners:
I edited the paths in all the HTTPService tags, WebService tags and .cfm files to work in my system set-up. The dot-notated paths in the CFCs worked for me the way they were written, but you may want to check those to make sure they work in your system configuration.
You must create the 'flex2' datasource. In the book's CD, you will find a bunch of database files – some of those are samples unrelated to the project, others, I couldn't figure out what the hell they are. I used 'flex2.mdb', a MS Access file to create my datasource in the CF Administrator.
I have put the project on my server so anyone interested can take a look. The main application URL is http://www.timos.com/FlexGrocerFinished/DataEntry.html and View Source is enabled.
In running 'Ecomm.mxml', when you drag products to the shopping cart, you will notice that the image being dragged does not display. That's because there is an error in 'private function dragIt' in the book: the third line of that function reads
'imageProxy.load("../assets/"+groceryItem.imageName);' – it should be
'imageProxy.load("assets/"+groceryItem.imageName);'
Sorry, I was not aware of that at the time I uploaded the project.
I have not been working on the book chapters in order because there are some subjects that I am particularly interested in right now. So, please, if you see any other problems when running the project, post a comment here.
Have fun, and I hope this helps somebody.

TypeSalesUpdate destination not being found. I double checked to make sure I added it correctly to the messaging-config.xml for the FDS. Do you have any idea what I might be missing in my setup? I think it is some
CF Gateway messaging setup for Flex messaging, but I am not sure.
Thanks,
Sean
At this point, my interest in this project does not include anything to do with FDS, so I am pretending chapters 19 through 21 in the TFS book don’t even exist. I don’t have the FDS server on my remote set-up.
I have my hands full trying to learn what I can do with Flex 2 and ColdFusion, which is all I presently need for the little projects I work on.
There must be one or two FDS sample projects on the Adobe site and some people working on those. I have had good luck getting help at the Adobe support forums. Perhaps that would be a good place to seek help on the subject.
Carlos
Is there any structure to the database that you created?
I guess the only thing that I can do is look at the CFC's and figure the
database tables from there. This incompleteness ios so damned frustrating
because I am trying to learn how to tie Flex with coldfusion
and there is no enough out bthere to make it happen.
I am at the point that I want to be able to create my own cfc's instead of using the wizard.
Thanks,
Gene
I did not create the database; ‘flex2.mdb’ is among the databases you find in the TFS CD and, of course, you have all the CFCs in the lesson files.
There is really no incompleteness – realize that you are studying a FLEX TFS book, not a ColdFusion training book and a lot of this stuff we are dealing with here is beyond the scope of Flex TFS.
You are right when you say you have to create you own CFCs for your projects – in this particular case, you are lucky they are already there for you. The wizard is good only to create CFCs from AS classes and vice-versa – that gives you a server-side object (the CFC) to tie to your client-side object (the AS class), thereby saving you a lot of code writing. Carefully read the last paragraph on page 431 of Flex TFS.
Most of the CFCs you will need in your projects have to be written from scratch – the wizard is not meant for that. You are mistaken when you say “there is not enough out there”. You just have to study ColdFusion, not Flex, to get up to speed on these things, and there are tons of stuff out there for ColdFusion – a lot more than there is for Flex.
on the categoriezedProductManager.mxml component
the httpService tag had
-----------------------------
<mx:HTTPService id="prodByCatRPC"
url="http://www.timos.com/FlexGrocerFinished/xml/catego...;
result="prodByCategoryHandler(event)"
resultFormat="e4x"/>
It needs to be.
----------------------------
<mx:HTTPService id="prodByCatRPC"
url="http://www.timos.com/FlexGrocerFinished/xml/catego...;
result="prodByCategoryHandler(event)"
resultFormat="e4x"/>