Hi, all.
I've checked the forums for similar posts, but I've not found a clear answer.
So, this may be a bit of a repeat.
I've got a simple CFC consisting of four files: form.cfm, formAction.cfm,
testCFC.cfc, show.cfm.
In formAction.cfm, I wrap the <cfinvoke> in a <cftry> to catch any database
errors:
<cftry>
<cfinvoke component="testCFC" method="insertRecord"
returnvariable="newRecordID" argumentcollection="#form#"></cfinvoke>
<cflocation url="show.cfm?id=#newRecordID#" addtoken="No" />
<cfcatch type="Database">
ERROR!
</cfcatch>
</cftry>
I purposely cause an error by trying to insert a string value into an integer
field.
Question: once I catch the error, how do I get the user back to the form and
populate the form fields with what the user has already typed in?
One post recommended putting all the form fields in the session scope, then
populating the form with session variables. But, that seems very cumbersome.
Thanks for the help,
Cameron
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216274
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