Additional parameters for Fusebox 5.5, event.xfa()
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.
- Posted in:
- ColdFusion
- Fusebox


Comment by cfPB – July 29, 2008
<cfset event.xfa("next", "main.home", "article", "201", "caller", "myotherpage", "message", "Thank you!") />
as the ability to specify multiple xfa's, when in fact you are specifying ONE xfa with whatever the arguments you want it to have passed along with.
So, you would call event.xfa for each xfa you needed to set.
Comment by Robert – December 03, 2008
Comment by John Whish – December 04, 2008
<fuseaction name="home">
<xfa name="about" value="main.about" />
<do action="main.home" />
</fuseaction>
<a href="#myself##xfa.about#">About</a>
Examples would be greatly appreciated. Thanks!
Comment by Chris Bowyer – September 03, 2009
<xfa name="about" value="main.about" />
simply creates a variable called xfa.about with a value of "main.about".
<do action="main.home" />
calls the main controller and executes the home fuseaction. It is not affected by the xfa code before it.
<a href="#myself##xfa.about#">About</a>
Is a way of having dynamic links where the link can change depending on the context. Most of the time you don't change the link, but sometimes it is useful when you are re-using a view.
In you example that link would become:
<a href="index.cfm?fusection=main.about">About</a>
Does that help?
Comment by John Whish – September 04, 2009
Not quite what I was after, but I had a play again with it tonight and the following explained all (to me anyway).
<cfparam name="variables.attributes.message" default="Mary had a little lamb">
<cfset event.xfa("next", "main.home", "message", "She ate it with mint sauce") />
<p><cfoutput><a href="#myself##xfa.next#">Home</a></cfoutput></p>
<p><cfoutput>#variables.attributes.message#</cfoutput></p>
<p><cfdump var="#attributes#"></p>
Comment by Chris Bowyer – October 08, 2009