> This is the piece of code that I am trying to rewrite in coldfusion :
>
> RequestIF request = null;
> request = new Request(RequestIF.AUTHORIZE);
>
> I rewrote that as:
>
> <cfobject action="create" type="java" class="RequestIF" name="reqif">
> <cfset x=reqif.AUTHORIZE>
> <cfset castresult=javacast("String",x)>
> <cfobject action="create" type="java" class="Request" name="reqtype">
> <cfset reqtype.init(#castresult#)>
I'm certainly no Java expert, but the CF code you wrote doesn't match the
Java code you're trying to rewrite. I think you'll need to explicitly
initialize your RequestIF object:
<cfset request = CreateObject("java",
"RequestIF").init(RequestIF.AUTHORIZE)>
I'm not sure where you're getting your second class from. I'm not sure why
you'd need to pass a public property of an object to its own initialization,
either.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212416
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54