Viewers: in countries Watching now:
In ColdFusion 9 New Features, author and developer Dan Short has gathered together the important updates and improvements in this dynamic web application. Dan showcases the new ColdFusion Builder application throughout the course, using it to work through the new language and CFScript enhancements in this release. He shows how to use the new Server Manager to compare servers and create server groups, as well as monitor server health through notifications. He also explains the new integration with Office applications, building Excel, Word, and even PowerPoint files on the fly from ColdFusion. Finally, he covers the important new Object Relational Mapping feature and how to use the built-in Flash Player. Exercise files accompany this course.
And then I can click Start Progress and it will start. I can click Stop and it will stop. And that's all you need to do in order to actually manage your progress bar from the client side perspective. But usually, when you want to use a progress bar, there is something going on the server. So, let's go back to CF Builder and I have a cfc here called StatusCheck. In my StatusCheck.cfc, I am going to increase the percentage of completion on my progress bar for each time the cfc gets called.
So, what I am doing is setting a value in Session that determines how far along we are in the progress. So, each time this getStatus function gets called, I am going to increase the progress by .1. Then down here at the bottom, I am going to set a status message depending on the value of my Status. So, if I am less than or equal to 20% done, I am going to show Starting. If I am more than a quarter percent done, I will say quarter finished, .5 half finished, 0.75 three quarters finished and when my Status is finally equal to 1, I'll show that we're actually finished with the progress bar and then I'll delete that value from the session, so that it's good to go on the next round.
So, back in progress.cfm, I am going to bind the results of my progress bar to that cfc. So, I'll type bind=cfc, and we are going to go to Chapter8.cfcs.StatusCheck.getStatus and instead of a duration, because we don't know how long this is going to take, we are going to say check the status of that cfc every 500 milliseconds or half a second. So, let's go back to the browser and reload. So, it now has my new bind attribute on it and I'll click Start Progress and you can see here it's actually showing me how far along I am in the process.
When it's all done, it says finished. So, when you bind a cfc to the CF progress bar, you need to return two things. You need to return the Status value, a value somewhere between 0 and 1 that determines the percentage of completion, and a message if you want a message to be displayed inside of the status bar. There are a few more customizations you can make around colors and background images, but the takeaway here is that you now have a quick and easy way to add a progress bar to any long-running process in your application, with just a few lines of code.
There are currently no FAQs about ColdFusion 9 New Features.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.