Changeset 863 for coldbox/trunk/src/system/plugins/renderer.cfc
- Timestamp:
- 08/29/07 06:19:47 (6 years ago)
- Files:
-
- 1 modified
-
coldbox/trunk/src/system/plugins/renderer.cfc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/src/system/plugins/renderer.cfc
r860 r863 54 54 <!------------------------------------------- PUBLIC -------------------------------------------> 55 55 56 <!--- ************************************************************* ---> 57 56 58 <cffunction name="renderView" access="Public" hint="Renders the current view." output="false" returntype="Any"> 57 59 <!--- ************************************************************* ---> 58 60 <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."> 59 61 <!--- ************************************************************* ---> 60 <cfset var RenderedView = "">62 <cfset var cbox_RenderedView = ""> 61 63 <cfset var Event = controller.getRequestService().getContext()> 62 64 <cfset var rc = event.getCollection()> … … 66 68 <cfset arguments.view = Event.getCurrentView()> 67 69 </cfif> 70 68 71 <!--- Test if we have a view to render ---> 69 72 <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."> 71 76 </cfif> 72 77 78 <!--- Render The View ---> 73 79 <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> 76 81 </cfmodule> 77 82 78 <cfreturn RenderedView>83 <cfreturn cbox_RenderedView> 79 84 </cffunction> 80 85 … … 85 90 <cfargument name="view" required="true" type="string" hint="The full path to the view. This can be an expanded path or relative. Include extension."> 86 91 <!--- ************************************************************* ---> 87 <cfset var RenderedView = "">92 <cfset var cbox_RenderedView = ""> 88 93 <cfset var Event = controller.getRequestService().getContext()> 89 94 <cfset var rc = event.getCollection()> 90 95 91 96 <cfmodule template="../includes/timer.cfm" timertag="Rendering View [#arguments.view#]"> 92 93 97 <cftry> 94 98 <!--- 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> 96 100 <!--- Catches ---> 97 101 <cfcatch type="missinginclude"> … … 102 106 </cfcatch> 103 107 </cftry> 108 </cfmodule> 104 109 105 </cfmodule> 106 <cfreturn RenderedView> 110 <cfreturn cbox_RenderedView> 107 111 </cffunction> 108 112 … … 110 114 111 115 <cffunction name="renderLayout" access="Public" hint="Renders the current layout." output="false" returntype="string"> 112 <cfset var RederedLayout = "">116 <cfset var cbox_RederedLayout = ""> 113 117 <cfset var Event = controller.getRequestService().getContext()> 114 118 <cfset var rc = event.getCollection()> … … 122 126 <!--- Render With No Layout Test---> 123 127 <cfif Event.getcurrentLayout() eq ""> 124 <cfset RederedLayout = renderView()>128 <cfset cbox_RederedLayout = renderView()> 125 129 <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> 127 131 </cfif> 128 132 </cfmodule> 129 133 130 <cfreturn RederedLayout>134 <cfreturn cbox_RederedLayout> 131 135 </cffunction> 132 136 … … 137 141 <!--- ************************************************************* ---> 138 142 139 <cffunction name="getlayoutsConvention" access="p ublic" output="false" returntype="string" hint="Get layoutsConvention">143 <cffunction name="getlayoutsConvention" access="private" output="false" returntype="string" hint="Get layoutsConvention"> 140 144 <cfreturn instance.layoutsConvention/> 141 145 </cffunction> … … 143 147 <!--- ************************************************************* ---> 144 148 145 <cffunction name="getviewsConvention" access="p ublic" output="false" returntype="string" hint="Get viewsConvention">149 <cffunction name="getviewsConvention" access="private" output="false" returntype="string" hint="Get viewsConvention"> 146 150 <cfreturn instance.viewsConvention/> 147 151 </cffunction> … … 149 153 <!--- ************************************************************* ---> 150 154 151 <cffunction name="getappMapping" access="p ublic" output="false" returntype="string" hint="Get appMapping">155 <cffunction name="getappMapping" access="private" output="false" returntype="string" hint="Get appMapping"> 152 156 <cfreturn instance.appMapping/> 153 157 </cffunction>
