macromedia flash flash remoting:
Extreme newbie here, so please bear with me. Could someone please explain to me
if this code is valid?
<CFFUNCTION NAME = "myLoginFunction">
<CFLOGIN>
<CFIF isDefined("cflogin")>
<CFQUERY NAME="query"
DATASOURCE="MyDatabase">
SELECT Roles FROM SecurityRoles
WHERE username='#cflogin.name#'
and password='#cflogin.password#'
</CFQUERY>
<CFIF query.recordcount gt 0>
<CFLOGINUSER NAME = "#cflogin.name#"
PASSWORD = "#cflogin.password#"
ROLES = "#trim(query.Roles)#" >
</CFIF>
</CFIF>
</CFLOGIN>
</CFFUNCTION>
Is this possible to do? ..or is it only valid to utilize this particular code
inside of Application.cfm as in:
<CFAPPLICATION NAME="myLoginApp">
<CFLOGIN>
<CFIF isDefined("cflogin")>
<CFQUERY NAME="query"
DATASOURCE="myDatabase">
SELECT Roles FROM SecurityRoles
WHERE username='#cflogin.name#'
and password='#cflogin.password#'
</CFQUERY>
<CFIF query.recordcount gt 0>
<CFLOGINUSER NAME = "#cflogin.name#"
PASSWORD = "#cflogin.password#"
ROLES = "#trim(query.Roles)#" >
</CFIF>
</CFIF>
</CFLOGIN>
I guess I'm getting confused as how to pass access <CFLOGIN> via Actionscript,
without accessing it from calling a specific ColdFusion Function - as in:
function CallSecureCFC() {
CFCResponse_txt.text = "";
CFCError_txt.text = "";
gatewayConnection.setCredentials
(userid_txt.text, pwd_txt.text);
myCFCService.myLoginFunction();
}
Perhaps, the last example has an inner functionality in accessing
Application.cfm internally that isn't apparent on the surface?
A general push in the right direction is greatly appreciated.
Thanks,
pud