I started playing with the new cfproperty stuff added in ColdFusion 9, but the primary piece that I want to use doesn't seem to work now in ColdFusion 10. I created the following CFC:
component displayName="Sources" {
/**
* @getter true
* @setter true
* @type numeric
* @default 1
**/
property sourceid;
/**
* @getter true
* @setter true
* @type numeric
* @default 1
**/
property sourcegroup;
public any function init () {
This.domainRegex = '\/\/(www\.)?(([A-Za-z0-9\-_]+\.?)+)';
return this;
}
}
When I dump the meta data for the CFC I can see the properties, but no methods created for them and I can't call getSourceId()
or getSourceGroup()
try this:
component accessors="true" displayName="Sources" {
property name="sourceid" type="numeric" default="1";
property name="sourcegroup" type="numeric" default="1";
public any function init () {
this.domainRegex = '\/\/(www\.)?(([A-Za-z0-9\-_]+\.?)+)';
return this;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With