User Guide

Table Of Contents
Creating a search tool for ColdFusion applications 557
To create a collection action page:
1.
Create a ColdFusion page with the following content:
<html>
<head>
<title>cfcollection</title>
</head>
<body>
<h2>Collection creation</h2>
<cfoutput>
<cfswitch expression=#Form.collectionaction#>
<cfcase value="Create">
<cfcollection action="Create"
collection="#Form.CollectionName#"
path="c:\CFusionMX7\verity\collections\">
<p>The collection #Form.CollectionName# is created.</p>
</cfcase>
<cfcase value="Repair">
<cfcollection action="Repair"
collection="#Form.CollectionName#">
<p>The collection #Form.CollectionName# is repaired.</p>
</cfcase>
<cfcase value="Optimize">
<cfcollection action="Optimize"
collection="#Form.CollectionName#">
<p>The collection #Form.CollectionName# is optimized.</p>
</cfcase>
<cfcase value="Delete">
<cfcollection action="Delete"
collection="#Form.CollectionName#">
<p>The collection is deleted.</p>
</cfcase>
</cfswitch>
</cfoutput>
</body>
</html>
2.
Save the file as collection_create_action.cfm in the myapps directory under the web root
directory
.
3.
In the web browser, enter the following URL to display the form page:
http://hostname:portnumber/myapps/collection_create_form.cfm
4.
Enter a collection name; for example, CodeColl.
5.
Verify that Create is selected and submit the form.
6.
(Optional) In the ColdFusion MX Administrator, reload the Verity Collections page.
The name and full path of the new collection appear in the list of Verity Collections.