background image

98

Working with files

You can now begin to work with files. The methods for working with a file can vary 
slightly, depending on the type of folder that contains the file.

Standard drag operations can be performed to move files from the Projects file list into 
Project folders.

Tip

The Project Files list that is displayed in the bottom pane of the Projects 
panel can be treated very similarly to the file list that is displayed as part 
of the Files panel. In other words, you can drag files or open files for 
editing from this list.

Files in manual-inclusive or virtual folders

The process for adding and deleting files is the same for both virtual and 
manual-inclusive folders. You cannot add files to or remove files from an 
auto-inclusive folder with these methods.

To add files to a manual- inclusive or virtual folder:

1. Right-click the folder and select Add Files to Folder.

The Add Files to Folder dialog box appears.

2. Locate and select the files you want to add to your project folder. 

3. Click Open to add the files to the folder.

To remove files from a manual-inclusive or virtual folder:

1. Select the folder in the project tree.

The files contained in the selected folder appear in the File list.

2. Right-click the file that you want to remove in the File list and select Remove From 

Project from the menu.

You are asked to confirm that you want to remove the file.

3. Click Yes.

4. The file is removed from the list.

Note

Removing a file from a project has no affect on the actual file in the 
mapped directory. You are only removing the reference to that file in the 
apf file.

Summary of Contents for COLDFUSION STUDIO 4.5-USING COLDFUSION...

Page 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...

Page 2: ...ability 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...

Page 3: ...es 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 Res...

Page 4: ...7 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...

Page 5: ...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...

Page 6: ...ree 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 Managin...

Page 7: ...ystems 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 Deploymen...

Page 8: ...ynamic 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...

Page 9: ...ons 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 Serv...

Page 10: ...ernet 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 conn...

Page 11: ...x 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...

Page 12: ...nformation 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 Ref...

Page 13: ...you don t 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...

Page 14: ...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...

Page 15: ...e 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...

Page 16: ...xvi Contacting Allaire...

Page 17: ...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...

Page 18: ...s 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 manage...

Page 19: ...ccess 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 sour...

Page 20: ...ab 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 se...

Page 21: ...sensitive syntax and usage information To view Help text in a tag editor or in Tag Chooser 1 Click the Toggle Embedded Help button Alt H to see Help text in a pane at the bottom of the dialog box 2 Cl...

Page 22: ...bar and select from the list You can maintain bookmarks by selecting Organize Bookmarks from the Help Bookmarks drop down list To bookmark an external document 1 Click the Bookmark button in the Help...

Page 23: ...search_tips pdf is installed in the Help Allaire Support folder of your installation directory If you have Adobe Acrobat Reader on your system you can open this file by double clicking it in Windows E...

Page 24: ...lder name in the box and press Enter to save the new folder You might need to press F5 to refresh the Help display You have several options for adding documents to the Help system To add documents to...

Page 25: ...se the path attribute in the book and chapter tags to specify the folder location To add a folder to the Help structure 1 Copy the new folder into the Help root directory 2 Open the Help directory fro...

Page 26: ...ocuments One approach is to create a file structure in the Help tree that conforms to the media file references in your documents Alternately you can supply a URL or accessible file location for remot...

Page 27: ...o work with folders and files Contents About the Files Tab 28 Working with Files 29 Changing the File List Display 31 Dragging Files from Windows Explorer 31 Building a Favorite Folders List 32 Workin...

Page 28: ...ping a Web site or Web applications see Using Projects for Site Management on page 91 but for general file management chores you work in the Files tab on the Resources window The Files tab gives you a...

Page 29: ...a default folder to open Opening files Use the procedures below to open a file in the file list To open a file 1 On the Files tab use the Drive List and the Directory List to navigate to the directory...

Page 30: ...the file list and use the File options in the shortcut menu to delete move copy or rename the file Saving files Unsaved changes in a document are indicated by an X next to the file name in the Documen...

Page 31: ...included for Web documents and Web images To change the file list view 1 Right click in the file list and choose View from the menu 2 From the View submenu you can toggle the display of the document t...

Page 32: ...er submenu choose the folder you want to see The folder is opened in the Directory List and its files are displayed in the file list To organize your favorite folders 1 Right click in the file list an...

Page 33: ...nfigured remote servers See Connecting to Servers via FTP and HTTP on page 39 for setup procedures If you set the Drive list to My Computer you can easily access all your drives plus Allaire FTP RDS s...

Page 34: ...he server name and port number 4 You can optionally set a time out limit for the connection 5 Click OK to open the file as an untitled document To copy Web page content Use Windows copy and paste comm...

Page 35: ...T E R 3 Configuring Web Browsers This chapter contains the procedures for configuring Web browsers for use by ColdFusion Studio Contents Configuring the Internal Browser 36 Configuring External Brows...

Page 36: ...nstalled on your system you can use it as the internal browser Go to http www microsoft com downloads to get the latest version If the Mozilla browser NGLayout Gecko control is installed you can selec...

Page 37: ...ontrol will not be able to create Gecko components and will not work 4 Open a DOS prompt change to the Mozilla bin directory and type regsvr32 mozctl dll If regsvr32 exe is not in you path use the Win...

Page 38: ...n the external browser For example the Browse using a temporary copy option is handy if you are making many edits to a page and don t want to use the Undo command If you selected the Use External Brow...

Page 39: ...Services RDS You can perform file transfers and other file management tasks using either FTP or RDS To access data sources and to run the debugger an RDS server connection is required Contents Require...

Page 40: ...Allaire FTP RDS feature provides an interface for connecting to an FTP server When the connection has been established you can access files on remote servers and maintain Web sites located anywhere on...

Page 41: ...ld is left blank Password The password for the account used to access the remote server You will be prompted for a password at login if this field is left blank Root URL Enter the http address of the...

Page 42: ...building Remote file access CFML debugging Managing ColdFusion security The ColdFusion installation configures basic security for the server and by default requires a password for the ColdFusion Admin...

Page 43: ...select the Add RDS Server command to open the Configure RDS Server dialog box 4 In the Configure RDS Server dialog box make these entries Description a label for the server connection Host name localh...

Page 44: ...DS list and select Properties from the menu 2 Make any changes necessary in the Configure Server dialog box and click OK To delete a server 1 Right click the server name in the Allaire FTP RDS list an...

Page 45: ...ing Server Mappings Development mappings are essential for working with files via Remote Development Services RDS Contents Understanding Development Mappings 46 Understanding RDS Mappings 47 Defining...

Page 46: ...r further processing then return it to the browser This is valuable for previewing applications and site elements in a test environment before deploying the site You establish this routing by associat...

Page 47: ...ldFusion server using drive mappings ColdFusion Studio debugging on remote server using Network Neighborhood ColdFusion Studio debugging on a remote server using RDS file access Using local paths Debu...

Page 48: ...the server you need to create a mapping for the App1 directory as follows Using UNC paths Network Neighborhood Developers can debug code against remote ColdFusion servers across an internal network Th...

Page 49: ...s App1 index cfm The browser might view it using the URL path http 215 180 21 1 App1 index cfm Although the server path can be inferred from the local RDS path you still need to create a mapping In sp...

Page 50: ...pping tab on the Remote Development Settings dialog box 4 Select a server from the drop down list of configured servers If a server is not on the list add it using the procedure described above 5 Ente...

Page 51: ...testing and deploying complex dynamic sites This chapter describes some basic techniques for creating Web content and application code Contents Inserting Code 52 Selecting a Color Coding Scheme 53 Us...

Page 52: ...ge the QuickBar display and organize toolbuttons To change the tab order right click the QuickBar select Organize QuickBar and use the arrow buttons to set the tab order To move a toolbar click and ho...

Page 53: ...s Select for the highlighted tag or double click it Tags that are inserted directly into a document are listed with brackets in the right pane such as HTML HTML All other tags have individual editors...

Page 54: ...display It is easy to implement a custom code scheme by changing the default colors and font styles To change a color scheme 1 Open Options Settings Editor Color Coding 2 Select the scheme you want to...

Page 55: ...he spacebar 2 Select from the drop down attribute lists as needed 3 Press Esc to close a list Tip If you just want to see the attributes and values associated with a tag place the cursor inside the ta...

Page 56: ...ull phrase in this case DOCTYPE HTML PUBLIC W3C DTD HTML 4 0 Transitional EN Extended characters To enter special characters and Latin 1 extended characters you can either type the ASCII code or selec...

Page 57: ...o select a different template or a wizard You can easily add a link from an HTML CFML JSP or other HTML embedded document to a URL To add a hyperlink use one of these commands Drag files from the File...

Page 58: ...esize it or you can switch to Edit mode to work directly in the code Using Keyboard Shortcuts Keyboard shortcuts are active for many file management editing and debugging commands Select Options Custo...

Page 59: ...In the Start Text window type or paste an opening code block You can set a default spacing between the blocks by pressing the Enter key at the end of the start text and at the beginning of the end tex...

Page 60: ...k OK The new folder appears in the Snippets list Anyone with access to the shared folder can now add edit and delete snippets Adding snippet shortcut keys Open the Options Customize dialog box and sel...

Page 61: ...ly accelerate development of data driven ColdFusion applications Contents Introduction to Database Tools 62 Registering Data Sources 62 Connecting to Data Sources 63 Viewing Data Sources 63 Using SQL...

Page 62: ...ed with the Professional and Enterprise versions To register a data source 1 Open the ColdFusion Administrator 2 Select the ODBC or native drivers page under the data sources heading 3 Name the data s...

Page 63: ...To open a data source 1 Open the Database tab and select a server from the dropdown list in the top pane Accessing a large database on a remote servers may take a few moments 2 Click the plus sign ne...

Page 64: ...le pane and choose from the Query Type list To open SQL Builder choose one of these methods Right click on a database or a table in the Database tab and choose New Query Click Tools SQL Builder select...

Page 65: ...being selected or the columns that are being updated SQL pane Shows you the SQL statement as it is built Writing SQL statements SQL Builder opens a SELECT statement by default since this is the most...

Page 66: ...onal query attributes in the Properties pane 7 Save or insert the query into your page To use a CFML variable in a SQL WHERE clause 1 In the Properties pane click in the Criteria column for the column...

Page 67: ...ery you can edit it later Pages that contain the edited query are not automatically updated so you will need to re insert the query for the changes to take effect To edit a query 1 Open the query fold...

Page 68: ...To insert the SQL statement within a CFQUERY tag click the Copy CFQUERY button Close the SQL Builder and paste the query into your page You will be prompted to save the query To insert a saved query...

Page 69: ...ated in the CFWDDX tag While WDDX is a valuable tool for ColdFusion developers it s utility is not limited to CFML WDDX serialization of common programming data structures such as arrays record sets a...

Page 70: ...lication on one system to find invoke and maintain state with objects on a remote system Communication between objects on remote systems uses an efficient special purpose wire protocol But these servi...

Page 71: ...rally more complex and ad hoc with dynamic structure WDDX allows developers to work with this data without the overhead of setting up a datasource for every type of data needed Therefore it integrates...

Page 72: ...need to worry about the details of time zone conversions However during deserialization to JavaScript expressions time zone information is not taken into account Complications arise because of the dif...

Page 73: ...registered ColdFusion 4 0 datasource and can be run from ColdFusion Server Create a simple query CFQUERY NAME q DATASOURCE snippets SELECT Message_Id Thread_id Username Posted from messages CFQUERY s...

Page 74: ...lNames length i o td colNames i td o tr for row 0 row nRows row o tr for i 0 i colNames length i o td r getField row colNames i td o tr o table Write the table to the HTML stream document write o Dump...

Page 75: ...nction serializeData data formField wddxSerializer new WddxSerializer wddxPacket wddxSerializer serialize data if wddxPacket null formField value wddxPacket else alert Couldn t serialize data Person i...

Page 76: ...xtarea name wddxPacket rows 10 cols 80 wrap Virtual textarea form Server side processing hr p b Server side processing b p CFIF isdefined form wddxPacket CFIF form wddxPacket neq Deserialize the WDDX...

Page 77: ...and content Contents Setting Options on the Editor Toolbar 70 Selecting Code and Text Blocks 70 Saving Text to the Multiple Entry Clipboard 70 Using Collapsing Text 71 Using Tag Editors 72 Using the T...

Page 78: ...ing Text to the Multiple Entry Clipboard This feature allows you to copy multiple text block and store them as separate entries in the Windows Clipboard Entries can be pasted in later as needed You mu...

Page 79: ...he marker may vary if a proportional font is used Enable a popup display of the full text when you move your mouse over the collapsed text marker You can set the maximum number of lines to display in...

Page 80: ...tag editor to view syntax and usage Help Using the Tag Tree and Tag Inspector The Tag Inspector panel of the Resources window contains two integrated tools the Tag Tree and the Tag Inspector By using...

Page 81: ...rofile Editor dialog box Before making changes to a profile it s a good idea to make a backup of the original file To configure Outline Profiles 1 Click the Configure Outline Profiles button at the to...

Page 82: ...t ColdFusion Studio installs includes a definition file written in VTML that specifies the valid attributes for that tag and the content and formatting of the tag s editor Working with tag definition...

Page 83: ...e selected tag or edit the event directly To add an event handler script block 1 Select a tag in the Tag Tree to display a list of supported attributes and events in the Tag Inspector pane 2 You can e...

Page 84: ...yntax only WEB XML Java EJB code used in deployment descriptor files Allaire Default HTML Tidy Settings Code formatting plus additional features HTML Tidy HTML Tidy a tool developed by Dave Ragget und...

Page 85: ...e default CodeSweeper 1 Open Options Settings CodeSweeper 2 Highlight a CodeSweeper entry in the list and click the Set as Default button 3 Click OK to save the change To run a CodeSweeper automatical...

Page 86: ...en the Options Settings CodeSweeper pane General settings Set the case for tag attribute and event names You can select to preserve the case as it is found in the document or change to all upper or al...

Page 87: ...generation tools To set rules for a tag 1 Select a CodeSweeper from the list 2 Edit the General Settings as needed 3 Switch to the Tag Specific Settings tab and highlight a tag name in the list Note t...

Page 88: ...ess to all the supported settings but you can also edit a profile directly This can be useful in a couple of situations If you want to remove an option from the settings pane so that it does not displ...

Page 89: ...reedom and more time to achieve design goals A site can be retrofitted with CSS although this requires deleting tag based formatting code About the Style Editor TopStyle Lite provides an integrated in...

Page 90: ...82...

Page 91: ...debug window gives you views of breakpoints variables recordsets tag and page hierarchies and page output From these panes you can set watches change disable and delete breakpoints and evaluate varia...

Page 92: ...ng Specify the first page in the application to be debugged Configuring RDS from the Debugger To access a remote server from Studio first configure the server and provide security login information if...

Page 93: ...usion Server list box at the top of the dialog box choose the ColdFusion server against which you ll run the debugging session 3 In the Studio Path box enter the file path ColdFusion Studio uses for t...

Page 94: ...by clicking in the gutter on the left side of the editor window The breakpoint lines are colored red Choose Debug Toggle Breakpoints to turn breakpoints on and off Use Debug Clear Breakpoints to dele...

Page 95: ...End This allows you to debug across multiple pages Debug windows Choose View Debug Window to open the Debug window There are several panes to this window Variables Displays all scopes of local variabl...

Page 96: ...ide a block of included code and want to step back to the point in your original page where you entered the included code Use Run to Cursor to execute up to the cursor position without having to set a...

Page 97: ...g the page 4 Select Watch to add the expression in the evaluator list box to the list of watched expressions The Watch area shows the values of watched expressions and any error messages in resolving...

Page 98: ...mmand Key Start Continue Ctrl F5 End Alt F5 Step into Ctrl F8 Step over Ctrl F9 Step out Ctrl F10 Run to cursor Ctrl F11 Variables Alt Q Watches Alt W Recordsets Alt R Stack Alt K Breakpoints Alt B To...

Page 99: ...ols in ColdFusion Studio to create and maintain Web sites Contents What is a Project 92 Creating a Project 92 Working in the Project Resources Window 93 About Project Folders 93 Managing Project Files...

Page 100: ...u create a new project you must specify a folder to hold the project file This folder must already exist somewhere on your computer If the existing folder has files and subfolders you can add them to...

Page 101: ...lobe Path settings for the project structure can also be opened from Projects Properties Project root folder the top folder in the project tree Project folder type and deployment settings Subfolders I...

Page 102: ...o or delete files from the mapped directory Changing a folder from auto inclusive to manual inclusive retains all files by default Note The location of a manual inclusive folder cannot be changed The...

Page 103: ...one of the following To open all project documents right click the project root select Open All Documents in Project from the menu All of the text based files in the entire project are opened in the...

Page 104: ...just need to know that they exist There are some limitations to where you can add virtual folders Virtual folders can only be added to the project root or to another virtual folder You cannot add a v...

Page 105: ...Click Auto Include Files Using Filter and select a filter from the drop down menu a filter limits the files that will be included based on the extension types that you specify Alternatively you can ma...

Page 106: ...add files to or remove files from an auto inclusive folder with these methods To add files to a manual inclusive or virtual folder 1 Right click the folder and select Add Files to Folder The Add File...

Page 107: ...with Resources The Resources tree provides a view of the project files based on the file type This is useful for isolating application files media files and other content You can easily edit the defau...

Page 108: ...ces tree You can right click a resource in the tree to edit or remove it Additional Project Features There are additional project features that are described in other sections of this manual These fea...

Page 109: ...ly are about control they are designed to control file management in application development and related work Common terms such as check in check out lock and unlock accurately describe the security p...

Page 110: ...4 Right click on the project root in the Projects tab and select Source Control Choose Source Control Provider A list of source control application detected on your system appears 5 Select from the P...

Page 111: ...more host servers You can specify a deployment path for the entire project or for individual folders This chapter describes how to specify options and to deploy a project Contents Setting Project Leve...

Page 112: ...er to a location that is relative to its parent folder or project For example Parent Folder MyDirectory ParentFolder Child Folder MyDirectory ParentFolder ChildFolder If the parent folder s deployment...

Page 113: ...Click OK Your deployment settings are applied to the folder Tip The project deployment information is in the project apf file By uploading the apf file along with a project you can maintain the same d...

Page 114: ...een mapped to in the Files panel are also included in this list You can deploy your project to any of these servers however only information for the Deployment Servers is included in the apf file for...

Page 115: ...lly then the project is closed The Project wide Upload Script generates a script that is identical in functionality to deploying the project directly During a project wide upload the project is opened...

Page 116: ...the last deployment by selecting View Results Deployment Right click in the Deployment pane to select display options Each succeeding deployment overwrites the Results window contents but the informat...

Page 117: ...y need to make changes and test its accuracy completeness and efficiency HomeSite provides a full set of tools to accomplish these necessary tasks Contents Working in the Results Window 110 Using the...

Page 118: ...operations are preserved when you move from panel to panel and when you close the Results window They are not saved if you repeat an operation or exit HomeSite You can open the Results window at any t...

Page 119: ...y saved in the basic search Open the drop down list for the Find what text box to enter a saved string You can selectively save search text in extended operations Click the arrow button next to the Fi...

Page 120: ...tion of RegExp syntax in HomeSite see Searching with regular expressions on page 113 Select the Skip tags while searching option to exclude tags from the search This option is not available when the R...

Page 121: ...e combined with special characters to define the pattern for the search The RegExp parser evaluates the selected files and returns each matching pattern When you select the Find option the matching pa...

Page 122: ...ches an a k or m Note that if you want to include closing square bracket in square brackets it must be the first character Otherwise it won t work even if you use Any regular expression can be followe...

Page 123: ...concatenation of regular expressions creates a regular expression that matches the corresponding concatenation of strings For example A Z a z matches any capitalized word The OR character allows a cho...

Page 124: ...is code searches for words that are all letters A Za z followed by one or more spaces followed by the first matched subexpression in parentheses The parser detects the two occurrences of is as well as...

Page 125: ...rcase DOS Windows full path that a is not the root of a drive and b has only letters numbers and underscores in its text A Za z A Za z0 9_ A ColdFusion variable with no qualifier A Za z A Za z0 9_ A Z...

Page 126: ...oft products are not used by HomeSite If the Microsoft Office spell checker is enabled you can optionally select from the drop down list of available languages Integrated spell checker options An Engl...

Page 127: ...To run the validator select one of these commands Click the Validate current document toolbutton or select Tools Validate Document Shift F6 The Validation Results pane displays either a No errors or w...

Page 128: ...P address of the link Status Initially set to Untested 2 Each link is checked in order The Status column displays OK for successful links and returns a File not found message or the server generated c...

Page 129: ...he project files 3 Optional Set a timeout value for the processing of each link 4 Click OK to run the verification routine The Results appear in the Links panel Note To prevent slow execution of proje...

Page 130: ...122...

Page 131: ...dialogs for editing HTML CFML JSP JavaScript and ASP language elements Contents The Visual Tools Markup Language VTML 140 Customizing Tag Chooser and Expression Builder 140 Dialog Definition Files 142...

Page 132: ...n the Studio products are marked accordingly You use VTML to control and customize the following interface elements Tag Inspector Tag Tips Tag Insight Tag Editing Dialogs Tag Outline Profiles Wizards...

Page 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...

Page 134: ...the category Notice that the HELPFILE attribute can be used to specify the Help as a separate file HELPFILE The relative path to the HTML Help for the category HELPFILE Docs MyTag htm ICON Folder Elem...

Page 135: ...n various markup languages Note Whenever you make changes to a VTM file or create a new one save the file then press Ctrl Alt Shift C to apply the changes The following features use tag definition fil...

Page 136: ...TEGORIES Defines logical grouping for tag attributes ATTRIBCATEGORIES EDITORLAYOUT Defines the layout of a tag editor EDITORLAYOUT TAGLAYOUT Defines the tag generation template TAGLAYOUT TAGDESCRIPTIO...

Page 137: ...ALIGN attribute Defining attribute value types The value type for a specific attribute can be specified using the TYPE attribute in the ATTRIB tag ATTRIBUTES ATTRIB NAME VALUE TYPE text ATTRIB NAME B...

Page 138: ...bute The following table describes the ATTRIB tag ATTRIB Tag Attributes NAME Name of the attribute CONTROL Optional Use to populate the attribute value to a specific tag editor control when editing ex...

Page 139: ...rs ELEMENTS BGCOLOR VLINK ALINK LINK TEXT ATTRIBGROUP NAME Misc ELEMENTS GIZMO ATTRIBCATEGORIES CACHEFAMILY Optional The name of the cache family associated with the attribute Colors FontFaces FilePat...

Page 140: ...efinition of how to populate controls with tag attributes Definition of the tag generation template Open the Extensions TagDefs mytag vtm file to see how these tasks are coded The following section wi...

Page 141: ...YTAG tag The tag editor looks like this The example displays a single Panel CONTAINER containing Label and TextBox controls Only a few controls can be containers TabDialog A tab dialog control capable...

Page 142: ...rea ActiveX ListBox ImageMapTextArea StyleTextBox StyleTextArea NAME Name of the control ANCHOR Optional The name of the control relative to which control is positioned If omitted control is positione...

Page 143: ...In pixels for example WIDTH 200 As the name of another control for example WIDTH SomeControl In this case the width of the specified control is used The control must be already positioned Set to maxi...

Page 144: ...into the editor controls The tag generation logic is stored in the TAGLAYOUT block This block contains a short template used to generate the final tag string The markup language used the TAGLAYOUT tem...

Page 145: ...based on user preferences Here is a version of the MYTAG layout template responding to case preferences TAGLAYOUT WIZIF OPTIONLowerCaseTags EQ true mytag color colorBGColor WIZELSE MYTAG COLOR colorBG...

Page 146: ...ibutes for example onCLick In order not to lose these unknown attributes during the editing process the editor engine creates the TAGDATAUnknownAttributes variable containing a list of unknown attribu...

Page 147: ...used in the Application cfm file to set defaults for a specific ColdFusion application TAGDESCRIPTION Providing Help from an external file As the Help content grows it may become cumbersome to specif...

Page 148: ...NTAINER NAME TabPage2 TYPE TabPage CAPTION Content embedded controls CONTAINER CONTAINER CONTAINER TYPE TabDialog TabDialog control is a special container control because it can only contain CONTAINER...

Page 149: ...AINER CONTAINER CONTAINER TYPE TabPage TabPage control is also special because it can only be contained inside a TabDialog CONTAINER control NAME In the ATTRIBUTES section of a Tag Definition a TabDia...

Page 150: ...DTH 50 CONTROL NAME txtSource TYPE TextBox ANCHOR lblSource CORNER NE WIDTH MAXIMUM CONTROL NAME lblAlign TYPE Label CAPTION Align ANCHOR lblSource CORNER SW DOWN 11 WIDTH 50 CONTROL NAME dropAlign TY...

Page 151: ...NTAINER EDITORLAYOUT Label control The following table describes the Label control CONTROL TYPE Label A label can serve as a caption for an input control and can display extra information about the di...

Page 152: ...the text box AUTOSIZE YES NO Automatically sizes the control to the text it contains This option is overridden if WIDTH or HEIGHT are explicitly specified EDITABLE YES NO Enables or disables editing A...

Page 153: ...YPE DropDown A drop down list box This tag requires ITEM subtags which specify the list of items in the drop down list The item tag has CAPTION and VALUE attributes CAPTION specifies the visible item...

Page 154: ...tBox control The following table describes the ListBox control FontPicker control The following table describes the FontPicker control CONTROLTYPE ListBox MULTISELECT The MULTISELECT attribute decides...

Page 155: ...Color ANCHOR lblFace CORNER SW DOWN 11 WIDTH 50 CONTROL NAME colorColor TYPE ColorPicker ANCHOR lblColor CORNER NE WIDTH MAXIMUM CONTROL NAME lblColor TYPE Label CAPTION Color ANCHOR lblFace CORNER S...

Page 156: ...ntrol The following table describes the CheckBox control CONTROL TYPE CheckBox A simple check box control Returns true or false CAPTION Caption displayed next to the check box CHECKED YES NO Specifies...

Page 157: ...r SELECTED TRUE ITEM VALUE SKIP CAPTION SKIP Neither saves the file nor throws an error ITEM VALUE OVERWRITE CAPTION OVERWRITE CONTROL TYPE RadioGroup A set of radio buttons This tag requires ITEM sub...

Page 158: ...the Text Area control CONTROL TYPE TextArea A simple multiline text entry control SCROLLBAR NONE HORIZONTAL VERTICAL BOTH Specifies which scrollbars should be displayed WRAP YES NO Enables wrapping of...

Page 159: ...entry control that allows the user to execute an SQL statement The control contains a button that the user can use to invoke the query builder SCROLLBAR NONE HORIZONTAL VERTICAL BOTH Specifies which s...

Page 160: ...ION Max Rows ANCHOR txtQueryName CORNER NE DOWN 0 RIGHT 10 WIDTH 70 CONTROL NAME lblTimeout TYPE Label CAPTION Timeout ANCHOR txtDataSource CORNER NE DOWN 0 RIGHT 10 WIDTH 70 CONTROL NAME numMaxRows T...

Page 161: ...essibility to local and remote file directory browsing FILTER The file filter that should be used by the file directory browsing dialog boxes For example FILTER gif jpeg jpg DIRONLY YES NO Specifies t...

Page 162: ...le is specified in a local or remote file dialog box By default the entire path would be pasted The attribute is irrelevant when the DIRONLY attribute is used RELATIVE YES NO Instructs the control to...

Page 163: ...tion is overridden if WIDTH or HEIGHT are explicitly specified TRANSPARENT YES NO Controls transparency CENTER YES NO Centers the image CONTROL TYPE ImageMapTextArea An image control capable of contai...

Page 164: ...s The default mode of the Style Editor when called from a Tag Editor is as an in line style editor so this attribute must be defined and set to No to allow editing of multiple style sheet rules Since...

Page 165: ...worked with VTML to create or edit tag dialog boxes you are familiar with building interface containers and controls and with defining page layout You can now add the Wizard Markup Language WIZML to y...

Page 166: ...ets the behavior of a page class This is useful for standard pages which are intended to be re used across multiple wizards INPUT Defines an input control on a wizard page If the NAME attribute of the...

Page 167: ...plate OUTPUTPATH Optional Output directory for the file Defaults to the value of the variable LOCATION Note that you must provide a wizard page where the user can specify this value DESCRIPTION Option...

Page 168: ...s whether a value for the parameter is required The Wizard manager will not enable the Finish button until all required parameters are entered Attribute Description NAME Name of the form control to wh...

Page 169: ...ing sure that the NAME attribute of the INPUT tag matches the Name property of the control All controls specified in the layout can be bound Wizard definition page example This sample wizard creates a...

Page 170: ...UM CONTROL NAME tbMetaDescr TYPE TextBox ANCHOR chkMetaDescr CORNER SW DOWN 8 WIDTH MAXIMUM CONTAINER PAGELAYOUT INPUT NAME ddDocType PARAM sDocType INPUT NAME tbTitle PARAM sTitle REQUIRED yes VALIDA...

Page 171: ...width MAXIMUM PAGELAYOUT INPUT NAME chkMetaKeywords PARAM bMetaKeywords INPUT NAME taMetaKeywords PARAM sMetaKeywords PAGE OUTPUT TEMPLATE TEMPLATE NAME Custom wml OUTPUTFILE MyFile cfm DESCRIPTION Ne...

Page 172: ...e used to customize the type of output generated The values of these wizard parameters can originate from several locations From a value set by a PARAM tag provided by the wizard From an embedded tag...

Page 173: ...takes a string argument rather than a direct variable reference WIZ Tags The behavior of wizard output templates is controlled by the use of WIZ tags in the template These tags are like ColdFusion tag...

Page 174: ...r example WIZSET Color Red WIZSET Pi 7 22 WIZSET ShortName Left LongName 5 The following table describes the WIZINCLUDE tag WIZLOOP WIZBREAK and WIZCONTINUE The WIZLOOP tag supports several types of l...

Page 175: ...EN wizelse sDocType eq HTML 2 0 DOCTYPE HTML PUBLIC IETF DTD HTML 2 0 EN WIZIF HTML HEAD TITLE sTitle TITLE WIZIF bMetaDescr eq true META NAME description CONTENT sMetaDescr WIZIF WIZIF bMetaKeywords...

Page 176: ...Location textbox This control should be bound to the Location parameter The value of this parameter is preset to the directory opened in the left pane Example PAGE name SelectWizardNameAndLocation typ...

Page 177: ...required yes validationMsg You did not select the data source Please select one before proceeding PAGE SelectTables This page displays a list of tables in the specified data source and lets the user...

Page 178: ...lue SearchFields ResultFields DetailFields UniqueIdentifier INPUT name lstTables param Tables required yes validationMsg You did not select any tables Please select at least one before proceeding PAGE...

Page 179: ...he page lets the user select fields from multiple tables for table joins Exposes controls lstJoins dropdown The control lists field pairs as selected from the dropdown field lists This list can be pre...

Page 180: ...e of the data source Tables required Comma delimited list of the tables ListBoxLabel Caption for the dropdown control ListBoxDescription More detailed description for the dropdown control MultiSelect...

Page 181: ...rol Example PAGE name IDField type SelectField caption Unique Identifier image images UniqueIDDetail bmp PARAM name DataSource value DataSource PARAM name Tables value Tables PARAM name ListBoxLabel v...

Page 182: ...190...

Page 183: ...ol HomeSite ColdFusion Studio and JRun Studio functions Contents Writing and Executing Scripts in Allaire Visual Tools 192 Application Object 194 Table of CommandID Values 206 Table of SettingID Value...

Page 184: ...file If the file extension is bas vb or vbs then the VBScript engine is used to execute the script Otherwise it is assumed that the file contains JScript source To automate visual tools tasks you will...

Page 185: ...File box 5 Make selections in the Button Image Button Caption and Button Hint boxes You can optionally create script hot keys on the Script Shortcuts tab and then click the Show keyboard shortcuts in...

Page 186: ...g script code can be used to test for the application type Tests Application ApplicationType property 0 HomeSite 1 CF Studio 2 JRun Studio function Main var iAppType var sMessage with Application if I...

Page 187: ...ad only Number of open documents ExeName OleString read only Filename of application executable including path Height integer Height in pixels of main window HInstance integer read only Instance handl...

Page 188: ...ve paths For local files BaseHREF should be the folder the file is in CloseAll function CloseAll wbPromptToSave WordBool WordBool Closes all open documents If wbPromptToSave is True the user will be p...

Page 189: ...3 General memory used 4 Total physical memory bytes 5 Available physical memory bytes 6 Total swap file storage space bytes 7 Available swap file storage space bytes 8 Total virtual space bytes 9 Avai...

Page 190: ...e the case of attribute values HTMLGetAttribute function HTMLGetAttribute const wsInTag wsAttr WideString WideString Returns the value for a particular attribute of a tag For example HTMLGetAttribute...

Page 191: ...t does not exist otherwise appends status to the file wsDescrip text description text for the entry MessageBox MessageBox const wsText wsCaption WideString nType Integer Integer Displays a message dia...

Page 192: ...wraps to the first PreviousDoc procedure PreviousDoc Moves to the previous document in the Document tab If the first document is showing wraps to the last Quit procedure Quit This method will attempt...

Page 193: ...yed in the status area ShellToApp function ShellToApp const wsAppFileName WideString WordBool Executes an external application Returns True if application launched successfully Note that command lines...

Page 194: ...ds Integer Pauses for given number of milliseconds Use Wait to enable scripts to execute loops yet still allow access to the UI Without the call to Wait in the loop the application will appear locked...

Page 195: ...yNewer wbEncryptCFML WordBool WordBool Uploads a project based on the passed criteria Note that wbEncryptCFML is specific to ColdFusion Studio Toolbar methods Each toolbar is identified by a unique na...

Page 196: ...VTM toolbutton displays passed VTM dialog box when clicked to the passed toolbar Fails if toolbar doesn t exist Returns True if Toolbutton already exists but doesn t add duplicate button CreateToolbar...

Page 197: ..._NAME app AddAppToolbutton TB_NAME c windows explorer exe Explorer app AddAppToolbutton TB_NAME c windows explorer exe app CurrentFolder Explorer Current Folder Here s the same code in VBScript Sub Ma...

Page 198: ...DID_cmdFileSaveAs 9 CMDID_cmdFileSaveAsTemplate 10 CMDID_cmdFileSaveAll 11 CMDID_cmdFileReload 12 CMDID_cmdFileInsert 13 CMDID_cmdFileConvertTextFile 14 CMDID_cmdFilePrint 15 CMDID_cmdFileOpenFromWeb...

Page 199: ...EOL 47 CMDID_cmdEditDeleteWordLeft 48 CMDID_cmdEditDeleteWordRight 49 CMDID_cmdEditSelectAll 50 CMDID_cmdEditConvertTagCase 51 CMDID_cmdEditGotoLine 52 CMDID_cmdEditGotoPreviousStartTag 53 CMDID_cmdEd...

Page 200: ...81 CMDID_cmdToolsSpellMark 82 CMDID_cmdToolsDocumentWeight 83 CMDID_cmdToolsThumbnails 84 CMDID_cmdToolsVerifyLinks 85 CMDID_cmdToolsValidateDoc 86 CMDID_cmdToolsValidateTag 87 CMDID_cmdToolsPalette...

Page 201: ...dViewTagInsight 107 CMDID_cmdViewTagTip 108 CMDID_cmdViewEditorToolbar 109 CMDID_cmdViewEditorTab 110 CMDID_cmdViewToggleQuickBar 111 CMDID_cmdViewResults 112 CMDID_cmdOptionsSettings 113 CMDID_cmdOpt...

Page 202: ...esources tab alignment deprecated in 4 5 SET_RESTAB_TABPOS 9 tab position top bottom SET_RESTAB_WIDTH 10 set Resource tab width SET_PALETTE_FILE 11 set current palette file SET_DYNAMIC_REFRESH 12 dyna...

Page 203: ...ad of vsList SET_USER_DICTIONARY_FILE 37 user dictionary for integrated spell checker SET_SPELLCHECK_SKIPTAGS 38 skip tags and script blocks when spell checking SET_SHOW_QUICKBAR 39 show quickbar SET_...

Page 204: ...INSTANCES 79 only for debugging multiple instances use same reg settings and would conflict SET_CLOSE_PARA_TAGS 80 add p when p toolbutton hit SET_PROMPT_ON_UNKNOWN_FILES 81 show warning before openin...

Page 205: ..._COLS_ACTIVE 122 set remote columns as active SET_REMOTE_FILELIST_COL_SIZES 123 remote FileList Column Size Settings SET_REMOTE_FPTREE_HEIGHT 125 set height for remote file list deprecated in 4 5 SET_...

Page 206: ..._HTML_HELP 170 set location ofhtml help files directory SET_DIR_THUMBNAILS 199 set location of stored thumbnails deleted at close SET_TAGCHOOSER_FILE 200 set location of tag chooser file SET_EXPBUILDE...

Page 207: ...ET_EDITOR_USE_TABS 310 set editor SET_EDITOR_AUTOREPLACE 311 set editor SET_EDITOR_AUTOREPLACE_TRIGGERS 312 set editor SET_EDITOR_AUTOQUOTE 313 automatically close quotes SET_EDITOR_AUTOCLOSE_ASP 314...

Page 208: ...PROJECT_LAST_OPENED 501 full path to last opened project SET_PROJECT_CLOSE_ALL_ON_OPEN 502 close all files when another project is opened SET_AUTOFORMAT_AFTER_DESIGN 600 run codesweeper when leaving d...

Page 209: ...che idx Filename Here s the same code in VBScript set app Application for idx 0 to app DocumentCount 1 sFile app DocumentCache idx Filename next If you know the filename of an open document you can re...

Page 210: ...ecially for large documents Allaire recommends that you only use Lines to evaluate single lines of text If you must use Lines to update many lines you can boost performance by wrapping the update in a...

Page 211: ...all text from the active document Close function Close wbPromptToSave WordBool WordBool Closes the active document If wbPromptToSave is True the user is prompted to save any changes Returns True if th...

Page 212: ...oves the next starting tag selecting it if wbSelect is True Returns False if no tag found GotoPreviousEndTag function GotoPreviousEndTag wbSelect WordBool WordBool Moves the previous end tag selecting...

Page 213: ...ave is True ReplaceAll function ReplaceAll strSearch strReplace OleVariant bMatchCase WordBool Integer Replaces all occurrences of strSearch with strReplace matching case if bMatchCase is True Returns...

Page 214: ...rrent selection Cursor Movement Procedures Use these methods to position the cursor If wbSelect is True then the current selection will be extended to the new cursor position procedure CursorDocEnd wb...

Page 215: ...ad write Allows you to perform a local deployment by overriding the assigned deployment server list Instead the actual deployment path names assigned to the folders are used directly ServerCount Integ...

Page 216: ...ideString const TargetFile WideString Integer Copies the source file to the target file location CopyFileExtended function CopyFileExtended const SourceFile WideString const TargetFile WideString Crea...

Page 217: ...sed folder name This path can be used in conjunction with the GetDeployServer and GetFolderName methods GetFolderFileCount function GetFolderFileCount const sFolderName String Integer Returns the numb...

Page 218: ...WideString bServerStatus WordBool Enable disables the deployment server specified by sServerName during deployment This allows some servers to be turned on or off during the deployment process SetLogF...

Page 219: ...rmat Project Folder Subfolder1 SubFolder2 SubFolderN where Project represents the name of the project Folder represents the topmost folder in the project SubFolder1 represents a folder stored relative...

Page 220: ...onse header field This field is included in 401 unauthorized response messages The field value consists of at least one challenge that indicates the authentication scheme s and parameters applicable t...

Page 221: ...r field Password OleVariant Sets gets the Web server access password Proxy OleVariant Sets gets the proxy server You can use the GetApplicationSetting function with the following setting constants 50...

Page 222: ...s gets the RECEIVED stream as a string Use SaveReceivedStreamToFile to save the received stream into a file Reference OleVariant Sets gets the Referer request header field This field allows the client...

Page 223: ...hodistobeapplied Username OleVariant Sets gets the Web server access username Methods Abort procedure Abort Abort the current HTTP operation Get procedure Get Performs an HTTP GET method request Uses...

Page 224: ...ttpPro State n ContentLength httpPro ContentLength n ContentType httpPro ContentType n RcvdCount httpPro RcvdCount n SentCount httpPro SentCount n StatusCode httpPro StatusCode n ReasonPhrase httpPro...

Page 225: ...httpPro Post var sOutput httpPro ReceivedStreamAsString app activeDocument Text sOutput PostAsync procedure PostAsync Performs an HTTP POST method request asynchronously SaveReceivedStreamToFile proce...

Page 226: ...ttp 127 0 0 1 test zip httpPro Get var bOverwrite false var sErrorMsg httpPro SaveReceivedStreamToFile d downloads test zip bOverwrite if sErrorMsg app MessageBox A error occured sErrorMsg HTTPProvide...

Page 227: ...d FileCount Integer readonly The number of elements in the archive Overwrite WordBool Sets gets whether the newly extracted files overwrite any existing file in the ExtractionDir directory Password Ol...

Page 228: ...tion should be stored in the archive Use bIncludeHiddenFiles and bIncludeVolumeLabels to restrict the inclusion of hiddenfilesorvolumelabels DonotsetthebIncludeVolumeLabelsparametertotrue unless you s...

Page 229: ...de 210 sMessage ErrorZeroTested else if nStatusCode 240 sMessage ErrorDLLNotFound else if nStatusCode 250 sMessage ErrorInternalLogic else if nStatusCode 280 sMessage ErrorTempFile else if nStatusCode...

Page 230: ...o determine whether the operation succeeded FileDate function FileDate nIndex Integer WideString Returns the datetime of an existing archive file element file directory volume by index The index value...

Page 231: ...d zipfiles test zip Loop through the contents of the ZIP file for x 0 x lt ZIPPro FileCount x if ZIPPro FileName x cfabort vtm app MessageBox quot File found in the archive quot quot ZIPProvider quot...

Page 232: ...l script use CreateObject AllaireClientApp TAllaireClientApp var app Application save the index of the current document so it can be returned to var nCurrentIdx app DocumentIndex start the table var s...

Page 233: ...he ActiveDocument will be the new document created above app ActiveDocument InsertText sTable false switch to browse mode app CurrentView 2 wait for user to re enter edit mode while app CurrentView 1...

Page 234: ...reClientApp set app Application save the index of the current document so it can be returned to nCurrentIdx app DocumentIndex start the table sTable b font color Blue Names of all open _ documents fon...

Page 235: ...ocument created above app ActiveDocument InsertText sTable False switch to browse mode app CurrentView 2 wait for user to re enter edit mode while app CurrentView 1 Wait is a home grown routine to mak...

Page 236: ...ME MyApp Dim app set app Application delete toolbar if it already exists if app ToolbarExists TB_NAME then app DeleteToolbar TB_NAME end if recreate toolbar app CreateToolbar TB_NAME dock it to the bo...

Reviews: