Hi Justin

The Coldfusion Struct class, in Java terms, actually descends from
Hashtable, not HashMap, so you have to create an intermediate
translation function, something like:

<cffunction name="structToHashMap" returntype="java.util.HashMap">
        <cfargument name="strTheStruct" type="struct" required="YES" />
        <cfscript>
                var objHM = CreateObject( "java", "java.util.HashMap" );

                objHM.putAll( arguments.strTheStruct );

                return objHM;
        </cfscript>
</cffunction>

You can then replace your call to myclass.init with:

myclass.init("abc","123",structToHashMap(data));

and that should work

Hope that helps!

Alistair

Alistair Davidson
Senior Technical Developer
Headshift.com

------------------------------------------
HEADSHIFT >>  www.headshift.com
T: 020 7357 7358  
------------------------------------------
smarter  >  simpler  >  social  >



--
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to