Mommy!... Skip step 4 that's for Model Glue which we don't need any more.

On 5/15/07, Bryan S <[EMAIL PROTECTED]> wrote:

Sorry! You also have to do this for the counting to work. I think I have
it all this time.

1) open reactor/data/oracle/ObjectDao.cfc
2) find the readFields function
3) just ABOVE the query <cfquery name="qFields" put this code

<cfif isDefined("session.readFieldsCounter")>
   <cfset session.readFieldsCounter = session.readFieldsCounter + 1>
<cfelse>
   <cfset session.readFieldsCounter = 1>
</cfif>

4) in dspTemplate.cfm put this code

<cfif isDefined("session.readFieldsCounter")>
   <h3>session.readFieldsCounter =
<cfoutput>#session.readFieldsCounter#</cfoutput></h3>
<cfelse>
   <h3>session.readFieldsCounter = "Not Defined"</h3>
</cfif>

On 5/15/07, Bryan S <[EMAIL PROTECTED]> wrote:
>
> I missed one variable conversion in my prepared code. This should work
> out of the box.
>
> <!---MODIFY THESE THREE LINES TO MATCH YOUR SYSTEM--->
> <cfset yourTableName = "Widget">
> <cfset yourColdspringXmlPath = "/mgsample01/config/ColdSpring.xml">
> <cfset yourColdspringPath = "coldspring.beans.DefaultXmlBeanFactory">
>
> <!--- Create the coldspring bean factory --->
> <cfset variables.instance.ColdSpringBeanFactory =
> createObject("component","#yourColdspringPath#").init() />
> <cffunction name="getColdSpring" access="public" returntype="any"
> output="false">
>     <cfreturn variables.instance.ColdSpringBeanFactory />
> </cffunction>
>
> <!--- Read the xml file --->
> <cfset
> getColdSpring().loadBeansFromXmlFile("#yourColdspringXmlPath#",true) />
>
> <!--- get the Reactor bean based on the definition in the xml file --->
> <cfset variables.instance.Reactor = getColdSpring().getBean("Reactor")
> />
> <cffunction name="getReactor" access="public" returntype="any"
> output="false">
>     <cfreturn variables.instance.Reactor />
> </cffunction>
>
> <cfset session.readFieldsCounter = 0>
> readFieldsCounterORIG=<cfdump var="#session.readFieldsCounter#" label="
> session.readFieldsCounter"><br>
>
> <cfset YourObject = getReactor().createRecord("#yourTableName#")>
>
> <cfset dict = getReactor().createDictionary("#yourTableName#") />
> readFieldsCounterTWO=<cfdump var="#session.readFieldsCounter#" label="
> session.readFieldsCounter"><br>
>
> <cfset dict = getReactor().createDictionary("#yourTableName#") />
> readFieldsCounterTHREE=<cfdump var="#session.readFieldsCounter#" label="
> session.readFieldsCounter"><br>
>
> <cfset dict = getReactor().createDictionary("#yourTableName#") />
> readFieldsCounterFOUR=<cfdump var="#session.readFieldsCounter#" label="
> session.readFieldsCounter"><br>
>




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to