As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.
The cfloop collection attribute loops over every object within a COM/DCOM collection object, or every element in a structure:
<cfscript>
departments = structNew("Ordered");
/** On iterating this struct, you get the values in insertion order, which is the way you inserted the values. **/
/** Create a structure and set its contents. **/
departments.John = "Sales";
departments.Tom = "Finance";
departments.Mike = "Education";
departments.Andrew = "Marketing";
/** Build a table to display the contents **/
</cfscript>
<cfoutput >
<table cellpadding="2" cellspacing="2">
<tr>
<td><b>Employee</b></td>
<td><b>Department</b></td>
</tr>
<!--- Use cfloop to loop through the departments structure.The item attribute specifies a name for the structure key. --->
<cfloop collection=#departments# item="person">
<tr>
<td>#person#</td>
<td>#Departments[person]#</td>
</tr>
</cfloop>
</table>
</cfoutput>
Sign in to your account