CF only converts simple data types with JavaCast() as a means of
informing CF when there are overloaded methods in your Java object
receiving the arguments. There might be a way to return the java
resultset object from a query object using an undocumented method of
the query object. For a java.util.Map (which is the interface for
java.util.Hashtable and subsequently coldfusion.util.Hashtable) you
should be able to create a java hashtable object and insert all the
values from a struct this way:
<cfset hashtable = createObject("java","java.util.hashTable")>
<cfset mystruct.putAll(hashtable)>
Then pass the hashtable variable to your java object.
> Did you ever find an answer to this question? I'm going
> crazy trying to figure it out.
>> I'm having a problem trying to pass a query from
>> coldfusion as an
>> argument to a Java class invoked through CFOBJECT.
>>
>> CF is supposed to convert Structures and Queries to
>> java.util.Map when
>> passed in as a parameter to a cfobject call. But the
>> resulting object
>> in the java world is coldfusion.sql.QueryTable or
>> coldfusion.runtime.
>> Struct. Is there a way to force these to be a map when
>> passed in?
>>
>> Thanks
> -Mark
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207628
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