Greg -
I kinda use this tag in a slightly non-standard way, but maybe showing you my
code will help you sort out your problem.
In this instance, I use ReturnFuseaction inside another tag which checks to see
if the user has logged in or not; if not, ReturnFuseaction is set to the page
that the user is trying to get to, and then the user is taken to a login screen.
If they're verified, ReturnFuseaction is used with it's action="return"
attribute to take the user to the page they were trying to get to.
The first page (tag-within-a-tag):
<cfif NOT IsDefined("client.pass")>
<cfoutput>
<cf_returnfuseaction
action="set"
gotoURL="index.cfm?fuseaction=some_fuseaction_here"
returnURL = "#cgi.SCRIPT_NAME#?#cgi.query_string#">
</cfoutput>
</cfif>
The redirection code after the login query is run:
<cfif verify.recordcount gt 0>
<cfset client.pass = "1">
<cf_returnfuseaction action="return">
<cfelse>
<CFLOCATION URL="http://www.joboctopus.com">
</cfif>
Those are the only two places you need to use the tag - setting it, and taking
the user to where they need to go.
HTH.
Steve Ray
Greg Cronkright wrote:
> I am trying to set up a logon/password similiar to the fusebox.org
> suggestion site. When my app tries to use the custom tag "returnfuseaction"
> I get a couple errors:
>
> ERROR #1) client.ReturnFuseaction has already been cleared out.
>
> The error occurred while processing an element with a general identifier of
> (CFTHROW), occupying document position (29:4) to (29:83) in the template
> file D:\CFUSION\CustomTags\Fusebox\returnfuseaction\returnfuseaction.cfm.
>
> ERROR #1 CODE
> The tag is called after a form has been submitted
> dsp_loginform.cfm
> <FORM method="post"
> action="index.cfm?fa=login&<cfoutput>#request.urltoken#</cfoutput>">
>
> <cfinclude template="act_login.cfm"> <!---(fusebox.org - act_login.cfm) --->
> <cfset request.listofattributes="rememberme=#rememberme#">
> <cf_returnfuseaction
> action="return"
> defaulturl="#request.webroot#/index.cfm?rememberme=#rememberme#">
> </cfcase>
>
> ERROR #2) An error occurred while evaluating the expression:
> "#attributes.gotoURL#/#caller.fusetoken#" Error near line 19,
> column 22. Error resolving parameter CALLER.FUSETOKEN
>
> Why won't this tag work for me? What am I doing wrong... I have even tried
> to set up the fusebox.org site on my dev machine. I got the sample fusebox
> site working but I get the same errors when I access a page that uses the
> "returnfuseaction" tag.
>
> Afterthought: My client variables are being stored in the registry.
>
> Greg Cronkright
> LESEA, Inc. - IT/IS Dept.
>
> [EMAIL PROTECTED]
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists