The SETCLIENTCOOKIES="yes" is how I do it.  Maybe not 100% fusebox but it
does make thing easier, and I don't get any complaints from users, most
people have browsers set to accept cookies.  

Would also like to hear comments from other.  

Hal, do you use the SETCLIENTCOOKIES="yes"?  

Thanks. 


-----Original Message-----
From: Rob Schuff [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 5:48 AM
To: Fusebox
Subject: SETCLIENTCOOKIES: Was Re: Newbie: client variable persistence
problem


thanks folks.  But what is really the best way to go?  seems the easiest is
to set SETCLIENTCOOKIES="yes" then forget about appending urltoken to
**every single** cflocation and form action.

comments?

rob

---------------------------------------------------------------------
Robert Schuff                                       Bull Run Software
[EMAIL PROTECTED]                                Portland, OR USA
---------------------------------------------------------------------
----- Original Message -----
From: "Tim Price" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 8:35 AM
Subject: RE: Newbie: client variable persistence problem


> Hi Rob
>
> Because you have SETCLIENTCOOKIES="no" you will have to pass #urltoken#
> between all pages.
>
> #urltoken# is actaully a shortcut and contains the following string
> CFID=686&CFTOKEN=71191495
> Because client cookies are set to off, as soon as you go to another page
the
> system notices the CFID and CFTOKEN variables do not exist and creates new
> ones, thats why you loose client state. I had the same problem.
> You have to append the #urltoken# at the end of all your "Form Actions"
and
> URL <cflocation> and <HREF > actions.
>
> I set <cfparam name="request.urltoken" default="#urlToken#"> in my
> app_model.cfm file and then use the request scope as such ....
> <cflocation
url="#request.site.cfroot#/login/index.cfm?#request.urlToken#">
> <cfform action="index.cfm?#request.urltoken#" method="POST">
>
> I'm not 100% sure I need to store it a request scope level as I was
> initially using
> <cflocation url="#request.site.cfroot#/login/index.cfm?#urlToken#"> and
this
> seemed to work. However I looked at and example posted on here which used
> request.urltoken so I followed (I'm easily led !)
>
> Hope this helps.
>
> Thanx
> Tim Price
> Paceway Solutions Ltd (UK)
>
> PS. Can someone confirm that a custom tag inherits the request.urltoken
and
> therefore doesnt require it to be explicitly sent as an argument. This is
> the way I see it.
>
>
> ----Original Message-----
> From: Rob Schuff [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 22:12
> To: Fusebox
> Subject: Newbie: client variable persistence problem
>
>
> greetings folks,
>
> I'm a bit new to both CF and Fusebox.  I have a simple FB app that works
> well 'cept for the security stuff I'm adding in.  Seems like my client
> variables do not persist properly.  here is an entry from my index.cfm
file
> for the FA ValidateUser with is called from dsp_login:
>
>     <CFCASE value="ValidateUser">
>   <CFIF trim(attributes.btnLogin) is "OK">
>     <CFSET Client.UserID="#attributes.UserID#">
>     <CFSET Client.Password="#attributes.Password#">
>        <CFINCLUDE template="act_ValidateUser.cfm">
>     <CFIF Client.IsValidated>
>          <CFLOCATION URL="index.cfm?fuseaction=computers" ADDTOKEN="yes">
>     <CFELSE>
>       <!--- User was not validated --->
>       <CFLOCATION URL="index.cfm?fuseaction=home" ADDTOKEN="yes">
>     </CFIF>
>   <CFELSE>
>     <!--- User cancelled the login --->
>     <CFLOCATION URL="index.cfm?fuseaction=home" ADDTOKEN="yes">
>   </CFIF>
>
>    </CFCASE>
>
> here is my simple code for act_ValidateUser.cfm
>
> <CFPARAM NAME="client.UserID" DEFAULT="">
> <CFPARAM NAME="client.Password" DEFAULT="">
>
> <CFIF trim(client.UserID) is "Rob">
>   <CFSET client.IsValidated="True">
> <CFELSE>
>   <CFSET client.IsValidated="False">
> </CFIF>
>
> it works correctly for both cases of UserIsValidated, but only once.  For
> instance if I login and am successfully validated I am bounced to the
> dsp_computers.cfm page and the client variables have their expected
values.
> But as soon as I go to another page, the variable are not even defined.
SO
> what have I done wrong?  It seems to be a scope/persistence issue.
>
> thanks
>
> rob
>
> PS.  Here is app_globals.cfm:
>
> <!--- app_globals.cfm --->
>
> <CFSETTING ENABLECFOUTPUTONLY="no"
>            SHOWDEBUGOUTPUT="yes">
>
> <CFAPPLICATION NAME="GCRC Asset Manager"
>                CLIENTMANAGEMENT="yes"
>       CLIENTSTORAGE="cfClient"
>                SESSIONMANAGEMENT="yes"
>       SETCLIENTCOOKIES="no">
>
> <CFPARAM NAME="application.title"
>          DEFAULT="GCRC Asset Manager">
>
> <CF_FORMURL2ATTRIBUTES>
>
> <CFSET appPath="/fusebox/gcrcAssets">
> <CFSET request.self=cgi.script_name>
> <CFSET request.db.dsn="gcrcAssets">
> <CFSET request.db.type="odbc">
> <CFSET request.cfroot="#appPath#">
> <CFSET request.webroot="#appPath#">
> <CFSET request.fileroot="d:\InetPub\webroot\assets">
>
> P.P.S.  I do include app_globals.cfm in index.cfm and I can see that data
is
> being generated and stored in the access table for client variable storage
> that I have set up.
>
> ---------------------------------------------------------------------
> Robert Schuff                                       Bull Run Software
> [EMAIL PROTECTED]                                Portland, OR USA
> ---------------------------------------------------------------------
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to