Hi,
I would like to build some custom message handler to handle
various custom messages throughout the app. I am not interested in
the CF errors and/or messages, but more of things like "Account
Updated" "Account Locked due to multiple attempts". I am looking to
have a storage mechanishm to hold these error messages either in
the DB which may be easiest for me or I have heard of some using an
XML File and reading from that. I want to use UUID's for each error
message so in the url you might see errorId=4854-48484-24121-545464
or some long UUID. I think this will prevent or deter url
tampering, having simple values like errorCode=3 or errorCode=4
seems to easy for users to swap values. At least it seems that way
to me.
As of now, I do this on the display page
<cfparam name="variables.errorMsg" default="" />
<cfparam name="attributes.ec" default="0" />
<cfswitch expression="#attributes.ec#">
<cfcase value="1">
<cfset variables.errorMsg = "Account not found. Please
try again. " />
</cfcase>
<cfcase value="2">
<cfset variables.errorMsg = "Account Locked. "/>
</cfcase>
</cfswitch>
This does work, but Id like to find a more elegant solution.
Any thoughts?
-Westside