Dan,
Shouldn’t you store
your userRecord in some scope?
João Fernandes
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Vega
Sent: quarta-feira, 16 de Agosto
de 2006 15:34
To: reactor
Subject: [Reactor for CF] records
I have a quick questions about records. When you instatiate a record
object that object is stored in memory, correct?
<cfset user =
application.reactor.createRecord("users").load(userId=0)>
If i have a multi step form, 6 to be exact here is what I want to do. I want to
be able to analyze all of the data, set it to its record, and then on the final
step display all of the data so they can review their submission. ON the final
step I will perform all of the saves. The only problem is that if I ever call
user.getUsername() it's an empty string. Am I missing something here or should
the value that I set persist through the life of the object? The only
thing that should prevent this from working the way I want it to is if I re
instatiate the object at some point or load a new record correct?
<cfif form.step EQ "1">
<cfset user.setUserId(form.userid)>
<cfset
user.setUsername(trim(form.username))>
<cfset user.setEmailAddress
(trim(form.emailaddress))>
<cfset
user.setEmailAddress2(form.emailaddress2)>
<cfset
user.setPassword(form.password)>
<cfset
user.setPassword2(form.password2)>
<cfset user.validate() />
<cfset errorCollection = user._getErrorCollection()
/>
<cfif NOT
errorCollection.hasErrors()>
<cfset url.step = 2
>
</cfif>
<cfelseif form.step EQ "2">
etc...
</cfif>
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|