ColdFusion provides three methods for passing parameters to CFC methods in direct method invocations:
name="value" entries, as in the following CFScript example:
authorized = securityCFC.getAuth(name="Almonzo", Password="LauRa123");
argumentCollection structure. The following code is equivalent to the previous example:
argsColl = structNew(); argsColl.username = "Amonzo"; argsColl.password = "LauRa123; authorized = securityCFC.getAuth(argumentCollection = argsColl);
getAuth method, and passes the name and password as positional parameters:
authorized = securityCFC.getAuth("Almonzo", "LauRa123");
Note: For more information on using positional parameters and component methods in ColdFusion functions, see Creating user-defined functions.
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting
Version 7
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00001052.htm
Comments
addiv said on Jun 16, 2005 at 4:28 PM : ASandstrom said on Jun 30, 2005 at 7:58 AM : PENNY506 said on Dec 27, 2005 at 9:54 PM :