O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing Complex Data Types in Client Variables

As mentioned earlier, you can store only simple values (strings, numbers, dates, and Boolean values) in the CLIENT scope. If you attempt to store one of ColdFusion’s complex data types (structures, arrays, queries, and object references) as a client variable, you get an error message.

You can, however, use the <cfwddx> tag to transform a complex value into an XML-based string. In this serialized form, the value can be stored as a client variable. Later, when you want to use the variable, you can use <cfwddx> again to transform it from the string format back into its complex form.

There isn’t space here to discuss the <cfwddx> tag fully, but the following code snippets will be enough to get you started. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required