tracker issue : CF-4201841

select a category, or use search below
(searches all categories and all time range)
Title:

CFDUMP does not output value of CFC properties that do not have getter methods

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Mosh Teitelbaum / ()

Created: 04/04/2018

Components: Debugging, CFDump

Versions: 2016,2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.05.303689 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description:
The CFDUMP tag, when displaying the properties of a CFC, does not show the value of any CFC properties that do not have an associated, automatically generated getter accessor method.

Steps to Reproduce:
{code:java}
<cfcomponent name="test" accessors="true">
	<cfproperty name="shown" />
	<cfproperty name="notShown" getter="false" setter="true" />
</cfcomponent>

<cfset test = createObject("component", "test") />
<cfset test.setShown(true) />
<cfset test.setNotShown(false) />

<cfdump var="#test#" />
{code}

Actual Result:

CFDUMP will show both properties in the output but the value for "notShown" will come back as "[undefined value]".

Expected Result:

All property values should be shown.

Any Workarounds:
Have a getter method for all properties.

Attachments:

Comments:

We can only fetch the values of property if we have a getter method.The scenario listed here itself corresponds to breaking the OO paradigm i.e we should not be able to fetch the property value without a getter method.
Comment by S P.
27510 | April 18, 2018 10:32:06 AM GMT