ColdBox/coldbox-platform — pull request #71 by webflint (2012-01-19 20:19:05+00:00)
Title: Added support for passing in view args through event.setView()

This seems to work really well and was simple to add.

Couple notes though:

1) I had to modify the frameworkSupertype so that it it always passed the args struct into the renderer. This wasnt constant with all the arguments being optional but there was a use case that this handles.

Say we had 2 view calls in a single handler action:

function index( event, rc, prc ) {

event.setView( view="home/index", args={name="brett"});
sidebar = renderView( view="home/sidebar" );

}

If we didn't default the args to an empty struct in frameworksupertype the setView args would bleed through to the renderView() of the sidebar. I don't think we want views sharing arg collections unless they are explicitly passed in.

2) The requestContext has quite a view "private" variables that stores in the PRC. I think it would be great if they used their own scope and not the private scope since there are setters and getters as needed for these PRC vars and I would hate to overwrite any of them when setting my own PRC vars.

thanks