Re: Persistance of ColdFusion Structures

2006-06-21 Thread Tom Chiverton
On Wednesday 21 June 2006 16:03, Charlie Griefer wrote:
> you can wddx it :)

Doesn't work for CFCs though, so it's easier to say cookie and client can't 
store complex types.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244402
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Scott Stewart
Thanks Charlie, 

Using the session scope solved it.

sas

Scott Stewart

ColdFusion Developer/Administrator

GlobalNet Services, Inc.

www.gnsi.com

301-770-9610 x358 (Voice)

301-770-9611  (Fax)

 

The information contained in this message may be privileged, confidential,
and protected from disclosure.  If the reader of this message is not the
intended recipient, or any employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited.  If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your
computer.


-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 10:53 AM
To: CF-Talk
Subject: Re: Persistance of ColdFusion Structures

a structure in and of itself is just...a variable.  Whether or not it
"persists" depends on the scope in which the variable (structure)
exists.

the form scope (which is a structure) exists on the form's action
page, and will not persist beyond that.

You could put it into the session scope:



Make sure you use duplicate, since structCopy will create a pointer to
the form scope/struct, which will cease to exist past the action page.
 duplicate() creates a deep copy and the new variable will exist on
its own, independent of the original structure from which it was
copied.

On 6/21/06, Scott Stewart <[EMAIL PROTECTED]> wrote:
> All:
>
>
>
> Are ColdFusion structures meant to be persistent across pages. I have an
app
> where I need to trap form field data, if a user has entered an ID that
> already exists, and give them the option of reviewing the existing and
then
> submitting without re-entering.
>
>
>
> Scott Stewart
>
> ColdFusion Developer/Administrator
>
> GlobalNet Services, Inc.
>
> www.gnsi.com http://www.gnsi.com/>
>
> 301-770-9610 x358 (Voice)
>
> 301-770-9611  (Fax)
>
>
>
> The information contained in this message may be privileged, confidential,
> and protected from disclosure.  If the reader of this message is not the
> intended recipient, or any employee or agent responsible for delivering
this
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution, or copying of this communication is strictly
> prohibited.  If you have received this communication in error, please
notify
> us immediately by replying to the message and deleting it from your
> computer.
>
>
>
>
>
> 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244397
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Andy Matthews
But then it's no longer a structure per se...just a string.



-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 10:04 AM
To: CF-Talk
Subject: Re: Persistance of ColdFusion Structures


you can wddx it :)

On 6/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> A struct can't exist in a cookie, as they only allow simple values.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244396
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Andy Matthews
Ooops...

I added cookie because it persists, not because it can store a structure.
Thanks for pointing that out.



-Original Message-
From: Everett, Al (NIH/NIGMS) [C] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 10:00 AM
To: CF-Talk
Subject: RE: Persistance of ColdFusion Structures


A struct can't exist in a cookie, as they only allow simple values.

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 10:54 AM
To: CF-Talk
Subject: RE: Persistance of ColdFusion Structures

A structure will only live on the page which creates it unless it's set
in one of the following scopes:

SESSION
APPLICATION
SERVER
COOKIE

Note that this also includes sub structures of one of the above scopes.
IE.

APPLICATION.someStruct
SESSION.userinformation

etc.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244395
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Persistance of ColdFusion Structures

2006-06-21 Thread Charlie Griefer
Not arguing.  Just saying there are ways to save a struct into a
cookie.  Yes, it's not technically a struct anymore...just a string
representation thereof, and yes, it needs to be deserialized
back...but wanted to make the point that it -can- be done (even if in
a roundabout way) :)

On 6/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> Yes, you can, but then it's not REALLY a structure any more, is it? It's
> a string at that point. It needs to be deserialized to be used, and then
> it's back to being in a different scope.
>
> By that token they can also be stored in CLIENT variables as well.
>
>
> -Original Message-
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 21, 2006 11:04 AM
> To: CF-Talk
> Subject: Re: Persistance of ColdFusion Structures
>
> you can wddx it :)
>
> On 6/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> > A struct can't exist in a cookie, as they only allow simple values.
> >
> > -Original Message-
> > From: Andy Matthews [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 21, 2006 10:54 AM
> > To: CF-Talk
> > Subject: RE: Persistance of ColdFusion Structures
> >
> > A structure will only live on the page which creates it unless it's
> > set in one of the following scopes:
> >
> > SESSION
> > APPLICATION
> > SERVER
> > COOKIE
> >
> > Note that this also includes sub structures of one of the above
> scopes.
> > IE.
> >
> > APPLICATION.someStruct
> > SESSION.userinformation
> >
> > etc.
> >
> >
>
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244393
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Everett, Al \(NIH/NIGMS\) [C]
Yes, you can, but then it's not REALLY a structure any more, is it? It's
a string at that point. It needs to be deserialized to be used, and then
it's back to being in a different scope.

By that token they can also be stored in CLIENT variables as well.


-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 11:04 AM
To: CF-Talk
Subject: Re: Persistance of ColdFusion Structures

you can wddx it :)

On 6/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> A struct can't exist in a cookie, as they only allow simple values.
>
> -Original Message-
> From: Andy Matthews [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 21, 2006 10:54 AM
> To: CF-Talk
> Subject: RE: Persistance of ColdFusion Structures
>
> A structure will only live on the page which creates it unless it's 
> set in one of the following scopes:
>
> SESSION
> APPLICATION
> SERVER
> COOKIE
>
> Note that this also includes sub structures of one of the above
scopes.
> IE.
>
> APPLICATION.someStruct
> SESSION.userinformation
>
> etc.
>
> 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244391
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Persistance of ColdFusion Structures

2006-06-21 Thread Charlie Griefer
you can wddx it :)

On 6/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> A struct can't exist in a cookie, as they only allow simple values.
>
> -Original Message-
> From: Andy Matthews [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 21, 2006 10:54 AM
> To: CF-Talk
> Subject: RE: Persistance of ColdFusion Structures
>
> A structure will only live on the page which creates it unless it's set
> in one of the following scopes:
>
> SESSION
> APPLICATION
> SERVER
> COOKIE
>
> Note that this also includes sub structures of one of the above scopes.
> IE.
>
> APPLICATION.someStruct
> SESSION.userinformation
>
> etc.
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244389
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Everett, Al \(NIH/NIGMS\) [C]
A struct can't exist in a cookie, as they only allow simple values. 

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 10:54 AM
To: CF-Talk
Subject: RE: Persistance of ColdFusion Structures

A structure will only live on the page which creates it unless it's set
in one of the following scopes:

SESSION
APPLICATION
SERVER
COOKIE

Note that this also includes sub structures of one of the above scopes.
IE.

APPLICATION.someStruct
SESSION.userinformation

etc.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244386
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Persistance of ColdFusion Structures

2006-06-21 Thread Andy Matthews
A structure will only live on the page which creates it unless it's set in
one of the following scopes:

SESSION
APPLICATION
SERVER
COOKIE

Note that this also includes sub structures of one of the above scopes. IE.

APPLICATION.someStruct
SESSION.userinformation

etc.



-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 9:45 AM
To: CF-Talk
Subject: Persistance of ColdFusion Structures


All:



Are ColdFusion structures meant to be persistent across pages. I have an app
where I need to trap form field data, if a user has entered an ID that
already exists, and give them the option of reviewing the existing and then
submitting without re-entering.



Scott Stewart

ColdFusion Developer/Administrator

GlobalNet Services, Inc.

www.gnsi.com http://www.gnsi.com/>

301-770-9610 x358 (Voice)

301-770-9611  (Fax)



The information contained in this message may be privileged, confidential,
and protected from disclosure.  If the reader of this message is not the
intended recipient, or any employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited.  If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your
computer.







~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244384
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Persistance of ColdFusion Structures

2006-06-21 Thread Charlie Griefer
a structure in and of itself is just...a variable.  Whether or not it
"persists" depends on the scope in which the variable (structure)
exists.

the form scope (which is a structure) exists on the form's action
page, and will not persist beyond that.

You could put it into the session scope:



Make sure you use duplicate, since structCopy will create a pointer to
the form scope/struct, which will cease to exist past the action page.
 duplicate() creates a deep copy and the new variable will exist on
its own, independent of the original structure from which it was
copied.

On 6/21/06, Scott Stewart <[EMAIL PROTECTED]> wrote:
> All:
>
>
>
> Are ColdFusion structures meant to be persistent across pages. I have an app
> where I need to trap form field data, if a user has entered an ID that
> already exists, and give them the option of reviewing the existing and then
> submitting without re-entering.
>
>
>
> Scott Stewart
>
> ColdFusion Developer/Administrator
>
> GlobalNet Services, Inc.
>
> www.gnsi.com http://www.gnsi.com/>
>
> 301-770-9610 x358 (Voice)
>
> 301-770-9611  (Fax)
>
>
>
> The information contained in this message may be privileged, confidential,
> and protected from disclosure.  If the reader of this message is not the
> intended recipient, or any employee or agent responsible for delivering this
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution, or copying of this communication is strictly
> prohibited.  If you have received this communication in error, please notify
> us immediately by replying to the message and deleting it from your
> computer.
>
>
>
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244382
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Persistance of ColdFusion Structures

2006-06-21 Thread Scott Stewart
All:

 

Are ColdFusion structures meant to be persistent across pages. I have an app
where I need to trap form field data, if a user has entered an ID that
already exists, and give them the option of reviewing the existing and then
submitting without re-entering.

 

Scott Stewart

ColdFusion Developer/Administrator

GlobalNet Services, Inc.

www.gnsi.com http://www.gnsi.com/> 

301-770-9610 x358 (Voice)

301-770-9611  (Fax)

 

The information contained in this message may be privileged, confidential,
and protected from disclosure.  If the reader of this message is not the
intended recipient, or any employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited.  If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your
computer.

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244380
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54