MACROMEDIA COLDFUSION MX 61-CFML Reference page 555

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

}
Within ColdFusion, you use the following code:
<cfobject
action="create"
type = "java"
class = "fooClass"
name = obj>
<!--- ColdFusion can treat this as a string or a real number --->
<cfset x = 33>
Perform an explicit cast to an int and call fooMethod:<br>
<cfset myInt = JavaCast("int", x)>
<cfoutput>#obj.fooMethod(myInt)#</cfoutput>
<br><br>
Perform an explicit cast to a string and call fooMethod:<br>
<cfset myString = javaCast("String", x)>
<cfoutput>#obj.fooMethod(myString)#</cfoutput>
JavaCast
555

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents