Hi, all...
Can form variables be passed around between a calling page and
multiple cfc's?
I have a form with data I want to validate, then generate an email with.
I have the calling page with the form, which sends the form data via
argumentCollection,
to a form_validation.cfc. If the form
What is up with this?
How can an insert fail with this error?
[Macromedia][SQLServer JDBC Driver][SQLServer]Cannot insert the value NULL into
column 'PageID', table 'SocialCards4You.dbo.Pages'; column does not allow
nulls. INSERT fails.
PageID is an autoincrementing column in my MS SQL
Follow up... updates works, selects work. I dont know why the insert is
failing.
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2008 11:42 AM
To: cf-talk
Subject: insert error
What is up with this?
How can an insert fail with this
Something like this?
cfif someObject.validateTheForm(argumentCollection = form)
cfset variables.foo =
anotherObject.doSomethingWithForm(argumentCollection = form) /
cfelse
Form did not validate
/cfif
Or, are you wanting to pass the form data to another cfc method from
within the
AH I exported the table and re-imported it and the identity switch got
changed to No.
Now it works.
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2008 11:50 AM
To: cf-talk
Subject: RE: insert error
Follow up... updates works,
Hi, Dominic and thanks for the reply...
The second option sounds more like what I'm wanting to do.
And while reading your response, it occurred to me that if I
send the form data to a cfc for validation, and it validates,
I could just go straight to another method (how about to another cfc?)
Personally, I'd prefer the first approach. The validation method
should only be concerned with validating the form; it should not know
what to do if the form validates. However, it *would* make sense to do
it the other way around; ie. call the email method, which first calls
the validation method
Sorry, hungover
cffunction method=init ...
cfargument name=adminEmail .../
cfset _adminEmail = arguments.adminEmail /
cfreturn _adminEmail /
/cffunction
Should read:
cffunction method=init ...
cfargument name=adminEmail .../
cfset _adminEmail =
Taking a step back, why are you using a form validation CFC? Your goal
is that you want to validate a form then send an email. So the simple
way to do this is to post the form to itself, then at the top of the
page detect whether the page is posted to itself, run it through some
validation checks
Well if the database is there but CF says it isn't... I'd make sure you are
using the datasource that you think you are. :-)
Dump #application.cfg.msgboarddsn# to make sure that it is what you expect
it to be.
Then try something simple like simple like
cfquery
Should read: As for 'sharing' variables between *methods*
I picked up on that one. :o) Thanks for the feedback.
I'll give it some thought and see what happens.
Rick
Dominic Watson wrote:
Sorry, hungover
cffunction method=init ...
cfargument name=adminEmail .../
why are you using a form validation CFC?
No specific reason for using a CFC, except that I can put all my form
validation
routines into a single CFC easily enough.
My normal practice is to have a page submit back to itself (and even
with a CFC
or two involved, I still do that), but I've been
To more specifically answer your question, avoid the variables scope
inside of a CFC if you can. You can use that, but it is generally
considered bad design and it can lead to problems that are hard to
troubleshoot.
The variables scope should not be used for what Rick was suggesting
but
I'm considering taking the approach of making the appropriate email
routines that
follow validation routines, children (I think that's the term) of the
validation routines
so there's only one call from the calling page and then the data flows
through the
process of validation and emailing, then
cfset errors = someComponent.validationMethod( argumentCollection = form )
/
cfif StructIsEmpty( errors)
cfset result = someComponent.sendEmail( argumentCollection = form ) /
cfelse
!--- do some error handling ---
/cfif
That's exactly the approach I was taking when I started
I'm trying to figure out if there's a way to programmatically determine if a
computer (with Windows OS including XP home/pro, Vista) has .NET Framework 2.0
installed with DOS/Window's batch/utility programming.
Googling has not been effective for the solution.
Thanks.
Don
Chunshen Li
Rick,
Basic form validation is along the lines of was the first name
entered and is the length of the first name GT 0 are often specific
to a single form in the site and don't benefit from being abstracted.
From an OOP standpoint, the object can be the page, the form, or a
form field. A validation
I'm trying to figure out if there's a way to programmatically
determine if a computer (with Windows OS including XP home/pro, Vista)
has .NET Framework 2.0 installed with DOS/Window's batch/utility
programming.
(Purely from a quick google..) what about checking the folder structure
Hi all!
I've found a java equivalent to PHP pack('H*', function
Here it is:
code
String myHexStr = D0A0D0B0D0B7D0BCD0B5D180D18B; //some string in Russian,
charset UTF-8
byte [] b = new BigInteger(parNameHex, 16).toByteArray(); //maybe other
constructor to implement other formats of pack()
You're right, Mike...
I'm just using the CFC as more of a function library, not so much from
an OOP standpoint. (I only learned to use CFC's effectively in the last
week or so :o)
I'll have to dig into the this.validate() method a little more to
understand it.
I did see it discussed in the
So.. This being a CF list...
What does PHP pack do?
and this isn't a CF equivalent, it's a javascript equivalent.
Alexey Passichenko wrote:
Hi all!
I've found a java equivalent to PHP pack('H*', function
Here it is:
code
String myHexStr = D0A0D0B0D0B7D0BCD0B5D180D18B; //some string in
I'm trying to figure out if there's a way to programmatically
determine if a computer (with Windows OS including XP home/pro,
Vista)
has .NET Framework 2.0 installed with DOS/Window's batch/utility
programming.
(Purely from a quick google..) what about checking the folder
I'm trying to figure out if there's a way to programmatically
Yeah, that's one approach, I now have some other ideas as well, thanks.
Let us know what you end up with. In case I ever need to do this in the future
;-)
~|
So.. This being a CF list...
What does PHP pack do?
and this isn't a CF equivalent, it's a javascript equivalent.
In PHP Pack() is a complicated way of doing the equivalent of this in
CF: toBinary(toBase64(my string))
What's added by pack() beyond that CF example is a bunch of formatting
Check the registry.
..:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-Original Message-
From: C S [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2008 6:25 PM
To: cf-talk
Subject: Re: Not exactly cf question but hope it's ok
I'm trying to figure
Check the registry.
Unfortunately, I did not know how to read registry from dos with xp. Thanks for
that. Learn something new every day ..
C:\reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
~|
Adobe®
Check the registry.
Unfortunately, I did not know how to read registry from dos with xp.
Thanks for that. Learn something new every day ..
C:\reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework
Setup\NDP
Bobby is right and your approach is nice as well. And if I need to
Bobby is right and your approach is nice as well. And if I need to
check multiple programs, I may try the following:
regedit -e installedprograms.log
H KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
then try to find them in the extracted/exported file.
This approach
Regarding this.validate, I'm writing abstractly to refer to validating
an object's data within the object as opposed to sending it out to a
separate validation object. You won't find this in any manual.
Back when CFCs first came out I extensively researched how best to
handle function libraries
I think I see what you're saying. I'll have to give it some thought
and work on implementation.
Thanks.
Rick
Mike Chabot wrote:
Regarding this.validate, I'm writing abstractly to refer to validating
an object's data within the object as opposed to sending it out to a
separate validation
30 matches
Mail list logo