ColdFusion 9: AJAX Controls and Techniques
Illustration by Don Barnett

Using setForm to submit to a CFC


From:

ColdFusion 9: AJAX Controls and Techniques

with Daniel Short

Video: Using setForm to submit to a CFC

Now this video is really a bonus way to do the same thing we did in the last video. So let's open up login.cfm and we'll just change two lines of code. The first thing we're going to do is run the setForm function on the CFC proxy object to tell it that the next call we make to the authentication service should submit the form that we specify as the argument to that function. Now that sounds like a lot, but all we need to do is authService.setForm('loginform'), and again pay attention to do your casing.
Expand all | Collapse all
  1. 2m 41s
    1. Introduction
      59s
    2. Setting up and using the exercise files
      1m 42s
  2. 33m 31s
    1. Using the cfdiv and cfpod tags
      7m 28s
    2. Using the cfwindow tag
      10m 57s
    3. Securing container contents
      3m 38s
    4. Manipulating container contents
      5m 13s
    5. Debugging AJAX behaviors
      6m 15s
  3. 22m 34s
    1. Building tabs
      9m 1s
    2. Building accordions
      5m 49s
    3. Building border layouts
      7m 44s
  4. 42m 13s
    1. Using rich prompts with cfmessagebox
      8m 47s
    2. Uploading files with cffileupload
      8m 52s
    3. Understanding advanced cffileupload
      7m 23s
    4. Building with quick and easy Auto-Suggest
      6m 11s
    5. Using the cfprogressbar tag
      11m 0s
  5. 25m 37s
    1. Binding data to form fields
      8m 54s
    2. Building dependent select menus
      5m 32s
    3. Using cfform in AJAX containers
      3m 52s
    4. Using the cfslider tag
      7m 19s
  6. 37m 31s
    1. Understanding grid basics
      7m 28s
    2. Sorting and grouping data in grids
      3m 34s
    3. Binding data to grids
      5m 35s
    4. Editing data in static grids
      9m 16s
    5. Editing data in bound grids
      11m 38s
  7. 17m 17s
    1. Building a basic tree
      5m 10s
    2. Using query-driven trees
      5m 9s
    3. Binding complex data to a tree
      6m 58s
  8. 16m 4s
    1. Creating a map with markers
      4m 54s
    2. Adding additional markers to a map
      1m 43s
    3. Using custom markers and map controls
      5m 22s
    4. Dynamically populating marker content
      4m 5s
  9. 15m 10s
    1. Accessing CFCs from JavaScript
      8m 56s
    2. Performing asynchronous processing
      4m 17s
    3. Using setForm to submit to a CFC
      1m 57s
  10. 17s
    1. Goodbye
      17s

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course ColdFusion 9: AJAX Controls and Techniques
3h 33m Intermediate Jun 04, 2010

Viewers: in countries Watching now:

In ColdFusion 9: AJAX Controls and Techniques, Dan Short demonstrates how to add Web 2.0 style and functionality to applications using the complete set of AJAX controls and workflow tools in ColdFusion 9. Together, this tool set enables developers to build visually compelling, data-rich cross-browser web applications without having to write large amounts of custom JavaScript code. This course covers using ColdFusion layout controls, creating interactive forms and data grids, and adding a map powered by Google Maps. Exercise files are included with the course.

Topics include:
  • Manipulating and securing container contents
  • Debugging AJAX behaviors
  • Building UI elements such as accordions and border layouts
  • Using rich prompts with cfmessagebox
  • Understanding advanced cffileupload
  • Sorting and grouping data in grids
  • Binding data to form fields
  • Creating a map with markers
Subjects:
Developer Web
Software:
ColdFusion
Author:
Daniel Short

Using setForm to submit to a CFC

Now this video is really a bonus way to do the same thing we did in the last video. So let's open up login.cfm and we'll just change two lines of code. The first thing we're going to do is run the setForm function on the CFC proxy object to tell it that the next call we make to the authentication service should submit the form that we specify as the argument to that function. Now that sounds like a lot, but all we need to do is authService.setForm('loginform'), and again pay attention to do your casing.

We need to make sure that loginform here matches loginform there. So now we're setting our asynchronous Mode, we're setting a form and then we're setting our CallbackHandler. Now we're going to get rid of the arguments for loginUser. "But Dan," you're saying, "how does the loginUser method get the Username and Password?" Well, what the proxy object is going to do now is to go through the login form, which we specified in the setForm method, and then send every form element that the form contains as arguments to the loginUser method.

So long as your form names match your CFC argument names, you don't need to specify any arguments whatsoever in the loginUser call. So let's go to Firefox and take a look at the results. So I'm going to reload my page, I still have it open from the last video, and we're going to type in our Username and our Password and click Login. We'll patiently wait for our login script to do its thing, close this, and we'll open up our request here and look at the Params. Now if you recall, in the previous videos when we looked at the Params we just saw a Username and Password, but now we're also seeing Login, which is the name of our button and that's it.

That's another way to do asynchronous processing against CFCs in your client-side JavaScript without having to deal with all of the plumbing yourself.

There are currently no FAQs about ColdFusion 9: AJAX Controls and Techniques.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion 9: AJAX Controls and Techniques.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.