MACROMEDIA COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO, COLDFUSION 4.5 Use Manual

  • Hello! I am an AI chatbot trained to assist you with the MACROMEDIA COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO Use Manual. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
Allaire Corporation
Using
ColdFusion Studio
ColdFusion Studio 4.5
for Windows
®
95/98/NT4/2000
Copyright Notice
© 1999 Allaire Corporation. All rights reserved.
This manual, as well as the software described in it, is furnished under license and may
be used or copied only in accordance with the terms of such license. The content of
this manual is furnished for informational use only, is subject to change without
notice, and should not be construed as a commitment by Allaire Corporation. Allaire
Corporation assumes no responsibility or liability for any errors or inaccuracies that
may appear in this book.
Except as permitted by such license, no part of this publication may be reproduced,
stored in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, recording, or otherwise, without the prior written permission of Allaire
Corporation.
ColdFusion and HomeSite are federally registered trademarks of Allaire Corporation.
HomeSite, the ColdFusion logo and the Allaire logo are trademarks of Allaire
Corporation in the USA and other countries. All other products or name brands are
the trademarks of their respective holders.
Part number: AA-45STU-RK
Contents
Welcome to ColdFusion Studio . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Introduction to the ColdFusion 4.5 Web Application Server . . . . . . . . . . . . . . . . . xii
Development Features in ColdFusion Studio 4.5. . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About ColdFusion Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Documentation updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
ColdFusion manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
ColdFusion Server online documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
ColdFusion Studio online documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Developer Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Allaire ColdFusion Developer Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
ColdFusion Web Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Making Web sites accessible to visually impaired visitors . . . . . . . . . . . . . . xvi
Contacting Allaire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Chapter 1 Exploring the Workspace . . . . . . . . . . . . . . . . . . . . 19
The Workspace Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Setting workspace options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Working in the Resource Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Resource tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating and Browsing Files in the Document Window . . . . . . . . . . . . . . . . . . . . . 22
Edit tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Browse tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Design tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Tracking Your Work in the Results Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Getting the Most from the Help System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Opening dialog box Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Accessing Help References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Bookmarking Help topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Searching Help References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Extending the Help system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Adding Help References to the booktree structure . . . . . . . . . . . . . . . . . . . . 27
Adding media content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
iv Contents
Chapter 2 Managing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
About the Files Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Setting startup options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Opening files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Opening recently used files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Adding a link to an open file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Saving files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Changing the File List Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Dragging Files from Windows Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Building a Favorite Folders List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Working with Files on Remote Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Downloading Web Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Chapter 3 Configuring Web Browsers . . . . . . . . . . . . . . . . . . 37
Configuring the Internal Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Setting the internal browser options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Configuring External Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Selecting a save option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Using the external browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Chapter 4 Connecting to Servers via FTP and HTTP . . . . . . 41
Required Server Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Connecting to an FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Overview of Remote Development Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Managing ColdFusion security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Configuring an RDS Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Managing Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Chapter 5 Adding Server Mappings . . . . . . . . . . . . . . . . . . . . 47
Understanding Development Mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Mapping for page processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Mapping for debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Understanding RDS Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
File mapping examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Defining a Server Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Chapter v
Chapter 6 Writing Code and Web Content . . . . . . . . . . . . . . 53
Inserting Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Inserting tags from the QuickBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Selecting tags from the Tag Chooser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Selecting a Color Coding Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Setting the supported file types for a scheme . . . . . . . . . . . . . . . . . . . . . . . . 56
Setting the tag display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Using Inline Tools to Enter Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Tag Insight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Function Insight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Tag Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Auto Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Code Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Extended characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Using Code Generating Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Adding Document Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Using Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Saving Code Blocks as Snippets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Sharing snippets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Adding snippet shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Chapter 7 Accessing Data Sources . . . . . . . . . . . . . . . . . . . . . . 63
Introduction to Database Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Registering Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Accessing Allaire Spectra data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Connecting to Data Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Viewing Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Using SQL Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
The SQL Builder interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Writing SQL statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Building a SELECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Testing a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Editing a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Inserting SQL into a Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Chapter 8 Exchanging Data via XML . . . . . . . . . . . . . . . . . . . . 71
An Overview of Distributed Data for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
WDDX Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Working with Application-Level Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
vi Contents
Data Exchange Across Application Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Time Zone Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
How WDDX Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Converting CFML Data to a JavaScript Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Transferring Data from Browser to Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Chapter 9 Editing Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Setting Options on the Editor Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Selecting Code and Text Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Saving Text to the Multiple-Entry Clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Setting the clip entry limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Using Collapsing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Setting options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Using Tag Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Using the Tag Tree and Tag Inspector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Navigating a document structure in the Tag Tree . . . . . . . . . . . . . . . . . . . . 82
Editing code in the Tag Inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating and editing event handler script blocks . . . . . . . . . . . . . . . . . . . . . 85
Preserving Code Formats with CodeSweepers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Selecting a CodeSweeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Running a CodeSweeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Managing CodeSweepers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Allaire CodeSweeper settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
HTML Tidy settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Formatting Pages with Cascading Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
About the Style Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Chapter 10 Debugging Application Code
from ColdFusion Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Interactive Debugger Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Configuring RDS from the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Specifying Server Mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Running the Interactive Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
The Debugger toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Debug windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Debugging across multiple pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Stepping through code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Evaluating expressions and setting watches . . . . . . . . . . . . . . . . . . . . . . . . . 98
Debugger Shortcut Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Chapter vii
Chapter 11 Using Projects for Site Management . . . . . . . 101
What is a Project? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Working in the Project Resources Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Configuring project options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Accessing project properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
About Project Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Manual-inclusive and auto-inclusive physical folders . . . . . . . . . . . . . . . 104
The project file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Folder types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Managing Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Working with folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Working with files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Working with Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Additional Project Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Working in a Source Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Why use source control? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Supported source control systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Setting up a project in source control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Chapter 12 Deploying Projects . . . . . . . . . . . . . . . . . . . . . . . . 113
Setting Project Level Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Setting Folder Level Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Relative to the Parent Folder Deployment Location option . . . . . . . . . . . 114
Specific Deployment Location option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Do Not Upload option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Adding Deployment Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Running the Deployment Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Deploying directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Using deployment scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Managing deployment scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Saving deployment results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Chapter 13 Customizing the Development Environment 119
The Visual Tools Markup Language (VTML) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Customizing Tag Chooser and Expression Builder . . . . . . . . . . . . . . . . . . . . . . . . 120
Dialog Definition Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Creating Tag Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Creating a tag definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Defining attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Defining attribute categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
viii Contents
Building Tag Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Defining controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Populating dialog boxes with tag data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Generating a tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Variables passed to the layout template . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Special variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Adding Tag Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Providing Help from an external file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
VTML Container/Control Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Building Custom Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Saving wizard files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Creating Wizard Definition Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
VTML for Wizards tag summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
VTML for Wizards tag reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Dynamic expressions in tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Bound controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Creating Wizard Output Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Expressions and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
WIZ Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
WIZML reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Wizard Definition Page Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Chapter 14 Scripting the Visual Tools Object Model . . . . 171
Writing and Executing Scripts in Allaire Visual Tools . . . . . . . . . . . . . . . . . . . . . . 172
Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table of CommandID Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Table of SettingID Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
DocumentCache Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
ActiveDocument Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
DeploymentManager Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Special notes about project folder names . . . . . . . . . . . . . . . . . . . . . . . . . . 207
HTTPProvider Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
ZIPProvider Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
ActiveScripting examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
JScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Third-Party Add-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Welcome to ColdFusion Studio
ColdFusion Studio is a powerful and flexible tool for building, testing, and deploying
dynamic Web applications.
It is also an easy to use tool to create and edit Web content, with support for a variety
of scripting languages.
Contents
Intended Audience...................................................................................................... x
Introduction to the ColdFusion 4.5 Web Application Server................................... x
Development Features in ColdFusion Studio 4.5 .................................................... xi
About ColdFusion Documentation ......................................................................... xii
Developer Resources................................................................................................ xiv
Contacting Allaire...................................................................................................... xv
x Intended Audience
Intended Audience
The principal audience for this user guide is professional Web developers who have a
working knowledge of HTML and Web server environments. The focus is on
introducing you to Studios interface and development tools.
Introduction to the ColdFusion 4.5 Web Application Server
The ColdFusion 4.5 release focuses on fundamentals — the fundamentals of delivering
your e-business: faster development, better reliability, enhanced scalability, expanded
integration, and stronger security.
At the center of the ColdFusion 4.5 release is an application server platform that's been
highly optimized with new functionality and native support for UNIX. As a result, your
e-business systems will run better and do more. With this release we're launching a
new edition of ColdFusion Server for Linux so you can take advantage of the reliability
and performance of the hottest new Internet server operating system.
While optimizing the core server, we also enhanced fundamental features including
email integration, server-side FTP and HTTP, advanced security, scheduling, and
database connectivity — again giving you more reliability and new functionality.
The focus on fundamentals extends to new features. As part of a broad new
commitment to Java, ColdFusion 4.5 has a range of new Java integration options from
Java CFXs to Java Servlet support to Java object and EJB connectivity. In ColdFusion
Studio 4.5, we added new tools to make you more productive including a flexible new
project architecture that makes managing and deploying complex Web applications a
snap. On the server, we focused on reliability, performance and security with features
such as service-level fail-over, Cisco Local Director integration, and OS security
integration.
Whether you're revolutionizing your company's HR operations, building the next
generation of your firm's global intranet, or launching the next killer .COM company,
you'll find the speed, scalability, connectivity, and security you need in ColdFusion 4.5.
Welcome to ColdFusion Studio xi
Development Features in ColdFusion Studio 4.5
A wide range of features are available in ColdFusion 4.5 for application development
and for creating Web content.
Allaire FTP & RDS — Manage all your files from a single interface that integrates access
to the Windows file system, ColdFusion server via Remote Development Servers (RDS),
and FTP servers.
Advanced Project Management — Manage complex Web application development
projects using physical, virtual, and auto-inclusive folders, resource browsing, and
direct access to version source control applications.
Scriptable Project Deployment — Write in VBScript or JScript to script application
deployment, with granular control over file uploads, to multiple server configurations
with FTP or RDS.
Editing — Easy tag selection, customizable language color coding, collaspe code
blocks, edit code in the Tag Inspector property sheet interface, navigate code hierarchy
in Tag Tree.
Function Insight — Insert function syntax as you type.
Code validation — Configurable for multiple versions of HTML, CFML, SMIL, and
browser-specific tags.
Image Map Editor — Create image maps right in ColdFusion Studio with a new
easy-to-use visual tool.
TopStyle Lite CSS Editor — Create and edit standards-compliant cascading style sheets
to easily control the look and feel of your web applications.
Wireless Support — Build wireless Web applications quickly and easily with the
complete set of Wireless Markup Language (WML) and Handhelp Markup Language
(HDML) visual tools.
CodeSweeper — Enforce code formatting with customizable rules.
Browsers — Preview pages in multiple browsers, with automatic detection of installed
browsers.
Proofing and Testing tools — Maintain site content with search and replace, spell
checking, code validation, and link verification.
Code templates — Quickly insert common text blocks and expand abbreviations.
Snippets — Save code blocks and content for reuse.
Templates and Wizards — Quickly create basic pages, tables, frames, JavaScript and
DHTML elements, and synchronized RealAudio content.
Image preview — View Web images and their properties.
User macros — Automate tasks by scripting the Visual Tools Object Model (VTOM).
xii About ColdFusion Documentation
About ColdFusion Documentation
ColdFusion documentation is designed to provide support for all components of the
ColdFusion development system. Both the print and online versions are organized to
allow you to quickly locate the information you need.
In addition to the book set, the documentation is provided in two other formats:
HTML — Browser-based Help references.
Adobe Acrobat (PDF) — Available from the root level on the product CD-ROM
and from the Developer area of Allaires Web site at http://www.allaire.com/
developer
.
Documentation updates
Late additions and corrections to ColdFusion printed documentation are listed in the
Documentation Updates page. To reach this page, open the Welcome to ColdFusion
page installed with ColdFusion, where you’ll find links to the update page as well as
links to other pages containing useful information about ColdFusion, Allaire support
options, and Allaire products and services.
For ColdFusion Studio users, you can access the Documentation Update page in the
Allaire Support folder in Help References.
ColdFusion manuals
The core ColdFusion documentation set consists of the following titles.
Administering ColdFusion Server
Includes instructions for installing ColdFusion Server. Describes configuration options
for maximizing performance, managing data sources, setting security levels, and a
range of development and site management tasks. If you are administering a
ColdFusion site, you’ll need this book to help plan and implement ColdFusion
security, load balancing, and for details about tuning the ColdFusion application
server.
Developing Web Applications with ColdFusion
Presents the fundamentals of ColdFusion application development and deployment.
Also includes detailed information about ColdFusion data sources, user interfaces,
and Web technologies.
CFML Language Reference
Provides the complete syntax, with example code, of all CFML tags and functions.
Welcome to ColdFusion Studio xiii
Using ColdFusion Studio
Documents everything you need to know about using ColdFusion Studio, including
features like projects, source control integration, as well as the Studio workspace and
interface.
Quick Reference to CFML
A valuable quick reference to CFML tags, functions, and variables.
ColdFusion Server online documentation
To view the HTML documentation, open the following URL: http://127.0.0.1/
cfdocs/dochome.htm
.
Note that because the Verity search libraries are not available on Linux for this release,
the online documentation search facility is not functional on Linux. If you try to open
the search page, a message box opens to explain why the facility is not available.
Acrobat versions of all ColdFusion documentation are available from the root level on
the product CD. If you dont have a product CD, you can download ColdFusion
documentation from the Allaire web site by visiting
http://www.allaire.com/
developer
and clicking the Documentation link.
ColdFusion Studio online documentation
Click the Help resource tab in ColdFusion Studio to view online Help pages. The help
tree contains ColdFusion documentation and a number of additional developer
resources. Studio online documentation is searchable and individual pages can be
bookmarked.
As you code your work, you can use the online HTML Reference to check syntax and
usage. You can open it from the Help References or press place the cursor in an HTML
and press F1. F1 help is available for all the supported languages. Open the Tag
Chooser (Ctrl+E) to view the list.
To learn about creating and modifying editor dialogs for tags, see Customizing the
Development Environment.
Power users and application developers can take advantage of the Visual Tools Object
Model to automate tasks and to call HomeSite functionality from other programs.
xiv Developer Resources
Developer Resources
This section is a brief listing of CFML resources.
Allaire ColdFusion Developer Center
The Developer Center at http://www.allaire.com/developer/referenceDesk/index.cfm
contains all the latest information on ColdFusion and offers tutorials, technical
articles, and links to other resources.
ColdFusion Web Resources
Following are just a few of many site dedicated to CFML development.
CF Advisor Online at http://www.cfadvisor.com/api-shl/engine.cfm.
Haznet’s Fallout shelter, a CF portal, at http://www.hudziak.com/haznet/
cfml.html.
ColdFusion Developers Journal, online version of the popular print journal, at
http://www.sys-con.com/coldfusion/index2.cfm.
Making Web sites accessible to visually impaired visitors
The W3C Web Accessibility Initiative at http://www.w3.org/WAI/ provides a great deal
of practical information about designing applications and interfaces for the broadest
range of users. Allaire supports user accessibility in its product interfaces and is
striving to fully implement the WAI recommendations.
Simple steps, such as providing a text alternative for images, graphics, and animations,
and using clear descriptive text for page elements and navigation, can make a world of
difference to a visually impaired users experience of your site. Validation tools are
available on the site to check compliance with established standards.
Welcome to ColdFusion Studio xv
Contacting Allaire
Please contact Allaire for sales and support information.
Corporate headquarters
Allaire Corporation
275 Grove Street
Newton, MA 02446
Telephone: 617.219.2000
Fax: 617.219.2001
http://www.allaire.com
Customer Service
Contact Allaire customer service to inquire about product orders and to obtain
corporate and product information and an Allaire username and password.
Hours: 8:00 AM to 8:00 PM Eastern time.
Toll Free US & Canada: 888.939.2545
Local & International: 617.219.2100
Email: info@allaire.com
Sales
Toll Free: 888.939.2545
Telephone: 617.219.2100
Fax: 617.219.2101
Email: sales@allaire.com
http://www.allaire.com/store
Technical support
Allaire offers a range of telephone and Web-based support options. See the Allaire
Support folder in the online Help References or go to http://www.allaire.com/support/
for a complete description of technical support services.
xvi Contacting Allaire
C HAPTER 1
Exploring the Workspace
This chapter acquaints you with the main areas of the interface. It will also give you
some pointers on customizing the workspace to make all your development work as
productive as possible.
Contents
The Workspace Areas................................................................................................ 18
Working in the Resource Windows .......................................................................... 19
Creating and Browsing Files in the Document Window ........................................ 20
Tracking Your Work in the Results Window ............................................................ 21
Getting the Most from the Help System .................................................................. 21
18
The Workspace Areas
The term Workspace describes the user interface that you see when you first load the
program. The workspace has four principal areas:
Command area At the top of the workspace is the title bar, which displays
the file path of the current document. Below that is the menu bar, which
contains standard Windows commands plus development menus. Below the
menus are toolbars that provide one-click access to commands and application
tools. To the right is the QuickBar, a tabbed toolbar for inserting JSP, HTML, and
other language elements.
Resources window Tabs for file management, data sources, Projects, code
snippets, online Help, and the Tag Inspector.
Document window Tabs for writing and browsing pages.
Results window Tabs to track search and replace operations, code validation,
link verification, images, project deployment, and compilation. The Console
tab gives you built-in access to the command prompt.
The following illustration shows the main workspace areas.
Exploring the Workspace 19
Setting workspace options
Selecting Options > Settings (F8) opens the control center for user preferences. By
navigating the feature tree in the left pane, you can view and change options for file
management, coding, and testing applications and Web content.
Working in the Resource Windows
The Resource window is a multipanel interface that lets you switch easily among
development resources as you build site content. Several of the panels contain their
own toolbars.
Resource tabs
Following is a summary of each of the Resource tabs:
The Files tab lets you manage files on local and network drives and on remote
servers. The drop-down list at the top allows you to pick a drive or server, the
bottom two panes display directories and files for the selected drive or server.
The Database tab is the access point for working with ColdFusion data sources.
The Projects tab helps you manage site content by organizing pages and
supporting files. You have the option of adding projects to your version source
control system. The drop-down list at the top displays recent projects. The
bottom two panes display the folders and files for the selected project.
The Site View tab gives you a visual rendering of the links in the current
document. Right-click in the pane to select a view type and display options.
Right-click on a link to expand the view.
The Snippets tab gives you a convenient place to store code blocks and content
for reuse. Snippets can also be shared with other users.
The Help tab contains product documentation and other online resources.
The Tag Inspector tab lets you edit in an interactive property sheet interface.
The top pane is the Tag Tree, a customizable view of the document hierarchy.
The bottom pane is the Tag Inspector, where you can edit code without having
to work in the Document window directly.
20
Creating and Browsing Files in the Document Window
The Document window is where code and other content are entered and edited.
Edit tab
The Editor has many productivity features for creating and editing code, content, and
navigation structures. You can easily insert tags, generate code, and add content from
text files, Microsoft Office applications, or directly from the Web. You can easily create
templates to insert common content.
The Editor toolbar extends vertically to the left and below the Edit tab in the Document
window.
Browse tab
Click the Browse tab or press F12 to process the current document in the internal
browser.
The Browse toolbar displays at the top of the Document window when you select the
Browse tab. You can use it to browse open documents, refresh the display, and access
browser tools. The document URL displays based on the current server mapping. See
Adding Server Mappings on page 45 for details.
Press F11 to view the document in the external browser. See Configuring External
Browsers on page 38 for details.
Design tab
This mode allows WYSIWYG creation and editing of HTML page elements. You can set
display and CodeSweeper formatting options in the Options > Settings > Design pane.
/