Request scope

New to coldbox: I have the following code from previous applications:

// This code would reside on the view page itslef

// Then on the Layout page under all the script calls I would have this code:
<cfif StructKeyExists(request,“js”)>

#request.js[key]#

This would allow me to dymaically load jquery code based on the view they were looking at.

Is accessing the request scope ok or is there a ColdBox better way to do this?

*** This the views are being dynamically loaded via Ajax to swap out forms and the views have no layout and by putting this code into the main layout it resolves many issues.

Any thoughts?

Thank you,
Paul