Well that's what we've had to do, but maybe it's me, but somehow I expected
there to be an implicit cfoutput as part of cfsavecontent, sort of like
cfmail...  



> -----Original Message-----
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 19, 2006 2:56 PM
> To: CF-Talk
> Subject: Re: cfsavecontent bug?
> 
> That's because you've got CFSETTING ENABLECFOUTPUTONLY set to true,
> and the text "test" inside the CF isn't inside a CFOUTPUT tag in the
> second example.  Best bet is to throw some CFOUTPUT tags inside the
> CFSAVECONTENT tag in your CFC: solve the problem and keep the CFC
> environment neutral.
> 
> cheers,
> barneyb
> 
> On 1/19/06, Russ <[EMAIL PROTECTED]> wrote:
> > I'm wondering if this should be reported as a bug.  Basically
> cfsavecontent
> > works in unexpected ways.  For example, lets say we have a component
> that
> > has a method called test, which returns a string.
> >
> >
> >
> > <cffunction name="test" returntype="string">
> >
> >   <cfset var str="">
> >
> >   <cfsavecontent variable="str">
> >
> >     test
> >
> >   </cfsavecontent>
> >
> >  <cfreturn str>
> >
> > </cffunction>
> >
> >
> >
> > The following 2 code listings do completely different things even though
> it
> > wouldn't look like it from the first glance.  Please note that I haven't
> > tested this code, so it might not compile, but you should get the gyst
> of
> > it.  Code listing 1 would output "test", while code listing 2 would
> output
> > an empty string.  To me, that doesn't work as expected.  Should this be
> > considered a bug and possibly fixed in future versions of CF, or is it
> just
> > me?
> >
> >
> >
> > Code listing 1
> >
> > <cfoutput>
> >
> > <cfinvoke component "test" method="test"  returnVariable="myStr">
> >
> > #mystr#
> >
> > </cfoutput>
> >
> >
> >
> > Code listing 2
> >
> > <cfinvoke component "test" method="test"  returnVariable="myStr">
> >
> > <cfoutput>
> >
> > #mystr#
> >
> > </cfoutput>
> >
> 
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
> 
> Got Gmail? I have 100 invites.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230029
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

Reply via email to