Sorry - no cigar.
I fails with a
*java.lang.NullPointerException*
Thanks anyway
On 4/28/06, Michael Traher <[EMAIL PROTECTED]> wrote:
>
> Well the good news is that this works in CFMX7 -
>
> I have replaced javacast("null","") with obj.getNull()
>
> about to try on 6.1.... drum roll would be nice...... :-)
>
>
> On 4/28/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]>
> wrote:
> >
> > Try this
> >
> > public class ReturnNull {
> >
> > public String getNull(){
> > return null;
> > }
> >
> > public String getNull(String testString){
> > return testString;
> > }
> > }
> >
> > Then
> >
> > <cfscript>
> > obj = createObject("java","ReturnNull");
> > name = obj.getNull("sometest string");
> > nothing = obj.getNull();
> > </cfscript>
> >
> > <cfdump var="#obj#" />
> > <cfdump var="#name#" />
> >
> > <cfdump var="#nothing#" /><!--- you wont be able to dump this but you
> > may be
> > able to use it in a method call ? --->
> >
> >
> > > -----Original Message-----
> > > From: Michael Traher [mailto: [EMAIL PROTECTED]
> > > Sent: 28 April 2006 08:50
> > > To: CF-Talk
> > > Subject: javacast("null","") - 6.1 version?
> > >
> > > Does anyone know what java code is behind this function call?
> > >
> > > The "null" option is not available in 6.1, but I would like to emulate
> > it
> > by
> > > writing my own little java class and calling it.
> > >
> > > --
> > > Mike T
> > > Blog http://www.socialpoints.com/
> > >
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239044
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