Event Args and Variables scope
ColdFusion
Some action on the mailing lists (and discussion in the office with Dave) brought up a good point about separating Mach-II event variables from your view/model/etc. One might want to move their app to a different framework some day, and if you had event.getArg() all through your view, it could make it inconvenient to switch over.
Doing something like this would help separate mach-II from your app's views.
This copies all of your Event args into your variables scope so you could access them via the usual "variables.event" or "variables.targetevent" and so on.
Doing something like this would help separate mach-II from your app's views.
<cfset structAppend(variables,event.getArgs())/>
This copies all of your Event args into your variables scope so you could access them via the usual "variables.event" or "variables.targetevent" and so on.





Loading....