Hi all,
i have two cfc' components usind extends as:
<!--- myParent.cfc --->
<cfcomponent displayname="myParent" output="false">
<cfscript>
this.myData = '';
</cfscript>
<cffunction access="remote" name="setQueryData" output="false" >
<cfquery name="this.myData" datasource="#myDatasource#">
SELECT *
FROM myTable
</cfquery>
</cffunction>
</cfcomponent>
<!--- myExtend.cfc --->
<cfcomponent extends="myParent">
<cffunction access="remote" name="getData" output="false" >
<cfquery name="qryData" datasource="#myDatasource#">
SELECT *
FROM this.myData
</cfquery>
<cfreturn qryData />
</cffunction>
</cfcomponent>
<!--- myTest.cfm --->
<cfset myObj = CreateObject("component", "cfcs.myParent") />
<cfset myObj.setQueryData() />
<cfset mySecondObj = CreateObject("component", "cfcs.myChild") />
<cfset finalData = mySecondObj.getData() />
<cfdump var="#finalData#">
this.myData is available in the child cfc component but it doesn't show any data.
Can I access data between components?
Thanks