<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFPROPERTY</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFPROPERTY</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Defines properties of a ColdFusion component (CFC). Used to create complex data types for web services. The attributes of this tag are exposed as component metadata and are subject to inheritance rules.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Extensibility tags
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">Syntax</span><pre>&lt;cfproperty 
   name=&quot;name&quot; 
   type=&quot;type&quot;
   required=&quot;boolean&quot;
   default=&quot;default value&quot;
   displayname=&quot;descriptive name&quot;
   hint=&quot;extended description&quot;
   &gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
cfargument, cfcomponent, cffunction, cfinvoke, cfinvokeargument, cfobject, cfreturn; "Documenting CFCs" in Chapter&#160;10, "Building and Using ColdFusion Components," in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion&#160;MX: Added this tag.
</p>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
You must position cfproperty tags at the beginning of a component, above executable code and function definitions. 
</p>

<p>
If a component is not used as a web service, The cfproperty only provides metadata information when the component is viewed using introspection; for example, by opening the CFC file directly in the browser. It does not define variables or set values that you can then use in your component.
</p>

<p>
For web services that you create in ColdFusion, the cfproperty tag defines complex variables used by the web service. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span>
<p>
The following code defines a component in the file address.cfc that contains properties that represent a street address:
</p>
<pre>&lt;cfcomponent&gt;
   &lt;cfproperty name=&quot;Number&quot; type=&quot;numeric&quot;&gt;
   &lt;cfproperty name=&quot;Street&quot; type=&quot;string&quot;&gt;
   &lt;cfproperty name=&quot;City&quot; type=&quot;string&quot;&gt;
   &lt;cfproperty name=&quot;State&quot; type=&quot;string&quot;&gt;
   &lt;cfproperty name=&quot;Country&quot; type=&quot;string&quot;&gt;
&lt;/cfcomponent&gt;
</pre>
<p>
This component represents a complex data type that can be used in a component that is exported as a web service, such as the following:
</p>
<pre>&lt;cfcomponent&gt;
   &lt;cffunction name=&quot;echoAddress&quot; returnType=&quot;address&quot; access=&quot;remote&quot;&gt;
         &lt;cfargument name=&quot;input&quot; type=&quot;address&quot;&gt;
         &lt;cfreturn arguments.input&gt;
   &lt;/cffunction&gt;
&lt;/cfcomponent&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Req/Opt</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">
<div id="NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Required</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>A string; a property name. Must be a static value.</p>

  </td>
  </tr>
  </table>
</div>
<div id="TYPE ">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TYPE </td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "any"


<p>A string; identifies the property data type:</p><ul>

<li>any</li>

<li>array</li>

<li>binary</li>

<li>boolean</li>

<li>date</li>

<li>guid: the argument must be a UUID or GUID of the form <i>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</i> where each<i> x</i> is a character representing a hexadecimal number (0-9A-F).</li>

<li>numeric</li>

<li>query</li>

<li>string</li>

<li>struct</li>

<li>uuid: The argument must be a ColdFusion UUID of the form <i>xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx</i> where each<i> x</i> is a character representing a hexadecimal number (0-9A-F).</li>

<li>variableName: a string formatted according to ColdFusion variable naming conventions.</li>

<li>a component name: if the type attribute value is not one of the preceding items, ColdFusion treats it as the name of a ColdFusion component. When The function executes, it generates an error if the argument that is passed in is not a CFC with the specified name.</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="REQUIRED">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">REQUIRED</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "no"


<p>Whether the parameter is required: </p><ul>

<li>yes</li>

<li>no</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="DEFAULT">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DEFAULT</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>If no property value is set when the component is used for a web service, specifies a default value. </p>
<p>If this attribute is present, the required attribute must be set to &quot;no&quot; or not specified. </p>

  </td>
  </tr>
  </table>
</div>
<div id="DISPLAYNAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DISPLAYNAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>A value to be displayed when using introspection to show information about the CFC. The value appears in parentheses following the property name.</p>

  </td>
  </tr>
  </table>
</div>
<div id="HINT">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">HINT</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Text to be displayed when using introspection to show information about the CFC. This attribute can be useful for describing the purpose of the parameter.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
