Title:
Bug 79480:(Watson Migration Closure)ColdFusion 8 and now 9 do not allow access to private and package functions through the "this" scope even when the function called from within the component definition that defines the package or priv
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Brett Suwyn / Brett Suwyn (WF Software)
Created: 08/18/2009
Components: Language, CF Component
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,247238 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 5
Problem:
ColdFusion 8 and now 9 do not allow access to private and package functions through the "this" scope even when the function called from within the component definition that defines the package or private function.This limits the ability to chain methods together and makes CFML much more verbose than it needs to be. It is very convenient to return this (<cfreturn this />) and to use that return object to call more methods. i.e. myPage.setTitle(“My Page Title”).validateTitle().save()
Method:
Create a component and define two functions, one private and one public. From the public function call the private function with this.PrivateFunction(). Create a template to create the component object and request the public function.ColdFusion will throw an invalid function access error reporting that the private function cannot be called even though it is being called from within the component definition.See the CFML Compatibility Report for more information on this: http://bit.ly/info/o7zLq
Result:
Access was to the function was restricted
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039697
External Customer Info:
External Company:
External Customer Name: Brett Suwyn
External Customer Email: 1E736C5744AAE692992016B7
External Test Config: 08/18/2009
Attachments:
Comments: