Passing parameters in direct method invocations
ColdFusion
provides three methods for passing parameters to CFC methods in direct
method invocations:
You can pass the parameters the form of comma-separated name="value" entries,
as in the following CFScript example:
authorized = securityCFC.getAuth(name="Almonzo", Password="LauRa123");
You can pass the parameters in an argumentCollection structure.
The following code is equivalent to the previous example:
argsColl = structNew();
argsColl.username = "Almonzo";
argsColl.password = "LauRa123";
authorized = securityCFC.getAuth(argumentCollection = argsColl);
You can pass positional parameters to a method by separating
them with commas. The following example calls the getAuth method,
and passes the name and password as positional parameters:
authorized = securityCFC.getAuth("Almonzo", "LauRa123");