What is the Private Request Collection?

What is the private request collection used for? I’ve seen it referenced in the ColdBox debugging info, in the ‘inflateToPRC’ argument of various methods in the flash RAM object, and in the third argument of event.getValue(), but I haven’t really seen any documentation stating what this private collection is intended for or when it should be used, etc. Naturally, I’m curious about any semi-secret thing that has “private” in its name… :wink:

I treat the private request collection as “trusted”.

So, anything the user can provide is placed within the RC and anything I created is in the PRC. Thats just how I roll. You can do anything you want really.

Another reason to separate may be proxy calls. You can have ColdBox simply return the RC. So, you can place values you don’t want returned in the PRC. But, I prefer granular control.

Does that help?

Aaron Greenlee

The idea behind the private request collection it is a collection for you to use that only YOU put variables into, so it won’t be dirtied with variables from the URL,FORM scopes, etc.

Make sense?

Curt Gratz

Computer Know How

Yes, that’s helpful and gives me a good idea of its purpose. Thanks!

+1 for this.

One frustration I have had though is the clutter that becomes of the
prc scope.

To keep things organized I use substructures. Problem is that
event.setValue, event.paramValue, etc don't support this.

Calling event.paramValue("viewprops.showLink", false, true) will
produce the variable prc["viewprops.showLink"] not prc["viewprops"]

it's can be a headache so I don't use those functions.