Additional parameters for Fusebox 5.5, event.xfa()

April 29, 2008

This is documented in the Fusebox 5.5 release notes, but if like me you've forgot it then to add additional parameters to an Xfa just do this:

<cfset event.xfa("next", "main.home", "message", "Thank you!") />

The clever thing is that it uses the Search Engine Safe URL parameters, which you can set up in the FUSEBOX_PARAMETERS section of your Application.cfc, to delimit the string correctly and also URL encodes the values. So the above method call will give you the following:

No SES

main.home&message=Thank%20you!

With SES

main.home/message/Thank%20you!

To add multiple parameters, just keep adding them as value pairs to your event.xfa method call

<cfset event.xfa("next", "main.home", "article", "201", "caller", "myotherpage", "message", "Thank you!") />

It is worth noting that you can't use the following syntax:

<cfset event.xfa( name="next", value="main.home", "article","201", "caller", "myotherpage", "message", "Thank you!") />

As you are mixing styles for passing arguments.


1 comment

  1. NICE! exactly what I was looking for... thanks for the final line of mixing the two ways of passing arguments.

    Comment by cfPB – July 29, 2008

Leave a comment

If you found this post useful, interesting or just plain wrong, let me know - I like feedback :)

Please note: If you haven't commented before, then your comments will be moderated before they are displayed.