Lucee Tag Reference

<cfproperty>

Defines properties within components that can be used for web services, ORM mapping, and accessor method generation. Properties are exposed as component metadata and follow component inheritance rules.

Body

This tag can't have a body.

Example

<cfproperty
	[access=string]
	[default=object]
	[displayname=string]
	[getter=boolean]
	[hint=string]
	name=string
	[required=boolean]
	[setter=boolean]
	[type=string] ... >

Attributes

This tag has a fixed definition of attributes (see below). In addition it allows to use any additional attribute
Name Type Required Description
access string No Controls the visibility scope of generated accessor methods. Valid values are: public, private, package, or remote. 
default any No Sets the initial value for the property when an instance of the component is created. Can be any valid CFML value appropriate for the property's type. Lucee 7 allows complex values and preserves types. 
displayname string No A human-readable label for the property that appears in parentheses following the property name when using introspection tools or documentation generators. 
getter boolean No Determines whether to automatically generate a getter method for this property. Default is true. 
hint string No Descriptive text that explains the purpose and usage of the property. This information is displayed when using introspection tools or documentation generators. 
name string Yes The unique identifier for the property. Must be a valid variable name and cannot contain spaces or special characters except for underscore. 
required boolean No Indicates whether the property must have a non-null value. When true, validation will be performed during setter calls and object creation. 
setter boolean No Determines whether to automatically generate a setter method for this property. Default is true. 
type string No Specifies the data type of the property. Can be any valid CFML type (any, array, binary, boolean, date, guid, numeric, query, string, struct, uuid) or a component path for complex types.