How about this? event.copyToScope(vals, StructKeyList(url)); event.copyToScope(vals, StructKeyList(form));
Note that there is a difference between values submitted to a request via the URL and/or form, and values in the MG event context that originated from the URL and/or form. Controllers can alter values in the event context, so the values in the event context at logging time may not be the original values. If you really want the original input values and want to know where they came from, you should use the url and form scopes directly. For most purposes, controllers should not care where a value in the event context came from. Adding a feature to the framework to expose the origins of a value would normally contradict the framework's MVC architecture, but there is work being planned that may make such a feature desirable or even necessary. For the upcoming 3.2 release, the Model-Glue team is looking into integration of security tools such as Portcullis<http://portcullis.riaforge.org/> that sanitize inputs against various security attacks. If input sanitizing is active and some of the input values are unsafe, the sanitizer will scrub the unsafe values and you will not find the original values in either the event context or the scopes the input values came from. However for logging purposes, we may want to allow explicitly trusted components to have access to the original unsanitized values. This would likely be done through new methods, to prevent legacy code from accidentally using unsafe values. It would make sense for these new methods to provide information on the source of the values. The Model-Glue team is in the design phase for this security feature so the details have yet to be ironed out. All the thoughts on it that I've expressed here are completely my own and there is no guarantee that any of it will appear in a future release of Model-Glue. So don't hold your breath just yet ;) Cheers, -- Dennis On Sat, Feb 27, 2010 at 10:56 PM, Ryan Stille <[email protected]> wrote: > I'm working on a logging service that will log all the URL and/or Form > values for the current page. I can't seem to find a way to do this in > MG. > > I've found event.getAllValues(), but that has a lot of extra stuff in > it. I found this snippet after googling for a while: > > <cfset event.copyToScope(vals, event.getValue('fieldnames')) > > > But that will only get me Form variables. Is there anything that > will simply get me all the Form/url variables together? > > -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
