Show
Ignore:
Timestamp:
08/29/07 06:19:47 (6 years ago)
Author:
lmajano
Message:

Ticket #223
Finalized

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • coldbox/trunk/src/system/plugins/renderer.cfc

    r860 r863  
    5454<!------------------------------------------- PUBLIC -------------------------------------------> 
    5555 
     56        <!--- ************************************************************* ---> 
     57         
    5658        <cffunction name="renderView"   access="Public" hint="Renders the current view." output="false" returntype="Any"> 
    5759                <!--- ************************************************************* ---> 
    5860                <cfargument name="view" required="false" default="" type="string" hint="If not passed in, the value in the currentView in the current RequestContext will be used."> 
    5961                <!--- ************************************************************* ---> 
    60                 <cfset var RenderedView = ""> 
     62                <cfset var cbox_RenderedView = ""> 
    6163                <cfset var Event = controller.getRequestService().getContext()> 
    6264                <cfset var rc = event.getCollection()> 
     
    6668                        <cfset arguments.view = Event.getCurrentView()> 
    6769                </cfif> 
     70                 
    6871                <!--- Test if we have a view to render ---> 
    6972                <cfif arguments.view eq ""> 
    70                         <cfthrow type="Framework.plugins.renderer.ViewNotSetException" message="The ""currentview"" variable has not been set, therefore there is no view to render." detail="Please remember to use the 'setView()' method in your handler."> 
     73                        <cfthrow type="Framework.plugins.renderer.ViewNotSetException"  
     74                                                  message="The ""currentview"" variable has not been set, therefore there is no view to render."  
     75                                                  detail="Please remember to use the 'setView()' method in your handler."> 
    7176                </cfif> 
    72                          
     77                 
     78                <!--- Render The View ---> 
    7379                <cfmodule template="../includes/timer.cfm" timertag="Rendering View [#arguments.view#.cfm]"> 
    74                         <!--- Render the View ---> 
    75                         <cfsavecontent variable="RenderedView"><cfoutput><cfinclude template="/#getappMapping()#/#getViewsConvention()#/#arguments.view#.cfm"></cfoutput></cfsavecontent> 
     80                        <cfsavecontent variable="cbox_RenderedView"><cfoutput><cfinclude template="/#getappMapping()#/#getViewsConvention()#/#arguments.view#.cfm"></cfoutput></cfsavecontent> 
    7681                </cfmodule> 
    7782                 
    78                 <cfreturn RenderedView> 
     83                <cfreturn cbox_RenderedView> 
    7984        </cffunction> 
    8085 
     
    8590                <cfargument name="view" required="true" type="string" hint="The full path to the view. This can be an expanded path or relative. Include extension."> 
    8691                <!--- ************************************************************* ---> 
    87                 <cfset var RenderedView = ""> 
     92                <cfset var cbox_RenderedView = ""> 
    8893                <cfset var Event = controller.getRequestService().getContext()> 
    8994                <cfset var rc = event.getCollection()> 
    9095                 
    9196                <cfmodule template="../includes/timer.cfm" timertag="Rendering View [#arguments.view#]"> 
    92  
    9397                        <cftry> 
    9498                                <!--- Render the View ---> 
    95                                 <cfsavecontent variable="RenderedView"><cfoutput><cfinclude template="#arguments.view#"></cfoutput></cfsavecontent> 
     99                                <cfsavecontent variable="cbox_RenderedView"><cfoutput><cfinclude template="#arguments.view#"></cfoutput></cfsavecontent> 
    96100                                <!--- Catches ---> 
    97101                                <cfcatch type="missinginclude"> 
     
    102106                                </cfcatch> 
    103107                        </cftry> 
     108                </cfmodule> 
    104109 
    105                 </cfmodule> 
    106                 <cfreturn RenderedView> 
     110                <cfreturn cbox_RenderedView> 
    107111        </cffunction> 
    108112 
     
    110114 
    111115        <cffunction name="renderLayout" access="Public" hint="Renders the current layout." output="false" returntype="string"> 
    112                 <cfset var RederedLayout = ""> 
     116                <cfset var cbox_RederedLayout = ""> 
    113117                <cfset var Event = controller.getRequestService().getContext()> 
    114118                <cfset var rc = event.getCollection()> 
     
    122126                        <!--- Render With No Layout Test---> 
    123127                        <cfif Event.getcurrentLayout() eq ""> 
    124                                 <cfset RederedLayout = renderView()> 
     128                                <cfset cbox_RederedLayout = renderView()> 
    125129                        <cfelse> 
    126                                 <cfsavecontent variable="RederedLayout"><cfoutput><cfinclude template="/#getappMapping()#/#getLayoutsConvention()#/#Event.getcurrentLayout()#"></cfoutput></cfsavecontent> 
     130                                <cfsavecontent variable="cbox_RederedLayout"><cfoutput><cfinclude template="/#getappMapping()#/#getLayoutsConvention()#/#Event.getcurrentLayout()#"></cfoutput></cfsavecontent> 
    127131                        </cfif> 
    128132                </cfmodule> 
    129133                 
    130                 <cfreturn RederedLayout> 
     134                <cfreturn cbox_RederedLayout> 
    131135        </cffunction> 
    132136 
     
    137141        <!--- ************************************************************* ---> 
    138142 
    139         <cffunction name="getlayoutsConvention" access="public" output="false" returntype="string" hint="Get layoutsConvention"> 
     143        <cffunction name="getlayoutsConvention" access="private" output="false" returntype="string" hint="Get layoutsConvention"> 
    140144                <cfreturn instance.layoutsConvention/> 
    141145        </cffunction> 
     
    143147        <!--- ************************************************************* ---> 
    144148         
    145         <cffunction name="getviewsConvention" access="public" output="false" returntype="string" hint="Get viewsConvention"> 
     149        <cffunction name="getviewsConvention" access="private" output="false" returntype="string" hint="Get viewsConvention"> 
    146150                <cfreturn instance.viewsConvention/> 
    147151        </cffunction> 
     
    149153        <!--- ************************************************************* ---> 
    150154         
    151         <cffunction name="getappMapping" access="public" output="false" returntype="string" hint="Get appMapping"> 
     155        <cffunction name="getappMapping" access="private" output="false" returntype="string" hint="Get appMapping"> 
    152156                <cfreturn instance.appMapping/> 
    153157        </cffunction>