I'm using <cfproperty />
to make use of implicit getters and setters in ColdFusion (Railo).
However, for more complex values like structs and arrays, how can I append to these?
<cfproperty name="settings" type="struct" />
How can I append an item into the property called settings? If I do the following:
<cfset setSettings(structAppend(getSettings(), { "hello" = "world" })) />
I get the following error:
java.lang.NullPointerException
Am I missing something here? I'm new to the cfproperty tag and thought it would be a time saver, but I can't figure this out.
Also, as a bonus how would I set a default value to these complex data types?
Thanks, Mikey