Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CF Tag to CF Script conversion

20 views
Skip to first unread message

Matt Parks

unread,
Jan 28, 2016, 9:15:59 AM1/28/16
to
I have a CFC that was written in CFTag that I wanted to convert to CFSCRIPT, but I keep getting an error on the View that was set up by this CFC. (framework FW/1 not that this matters)

The ERROR is on the rc.Details query is not available.

TAG CODE (which works as written):

<cfcomponent output="false" extends="base">

<cffunction name="Details" output="false">
<cfargument name="rc" />

<cfif structkeyexists(rc,"course_id")>
<cfset rc.course_id = url_decrypt(rc.course_id)>
</cfif>

<cfif structkeyexists(rc,"loc")>
<cfset rc.loc = url_decrypt(rc.loc)>
</cfif>

<cfset rc.Details = getCoursesService().getCoursesDetails( argumentCollection = rc )>
<cfset rc.Attributes = getCoursesService().getOtherAttributes( rc.course_id )>
<cfset rc.Navigation = getCoursesService().getMenu( argumentCollection = rc )>
<cfset rc.Req = getCoursesService().getPreReqs( rc.Details.CATA_ID, rc.Details.DEPT_ID, rc.Details.CRSE_ID )>

</cffunction>

</cfcomponent>

New CFSCRIPT.

component extends="base" {

function Defaults( rc ) {

if ( structkeyexists(rc,"course_id") ) {
rc.course_id = url_decrypt(rc.course_id);
}

if ( structkeyexists(rc,"loc") ) {
rc.loc = url_decrypt(rc.loc);
}

rc.Details = getCoursesService().getCoursesDetails( rc );
rc.Attributes = getCoursesService().getOtherAttributes( rc.course_id );
rc.Navigation = getCoursesService().getMenu( rc );
rc.Req = getCoursesService().getPreReqs( rc.Details.CATA_ID, rc.Details.DEPT_ID, rc.Details.CRSE_ID );

}
}

0 new messages