CFCs are nothing more than a language construct to encapsulate CFML. To suggest that it is wrong to use CFCs for something other than data access or business logic is wrong.
Matt Liotta President & CEO Montara Software, Inc. http://www.montarasoftware.com/ 888-408-0900 x901 > -----Original Message----- > From: Samuel R. Neff [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 12:16 PM > To: CF-Talk > Subject: Re: CFC output > > CFC's, and especially web services, are generally considered to be used > for > data access or business logic, not for any type of display. > > However, if you are dead set on doing this, then you can just put your > HTML > inside the CFFUNCTION just like you would with a custom tag. You can > specify output="yes" in the function declaration and then you don't need > to > use cfoutput in your function, or you can leave output attribute off and > use cfoutput in your function. > > Note that there is currently a bug in CFMX where html generated from a CFC > is not displayed when the CFC is stored in a shared scope variable > (application/session). > > If you want to use a web service for this, then wrap all the output inside > cfsavecontent and return it as a string. > > HTH, > > Sam > > At 11:46 AM 12/9/2002, you wrote: > >Does anyone have an example of a CFComponent with a function that > >returns HTML formatted output. Trying to write a function that performs > >a query based on specific arguments then outputs a select box based upon > >the query results as well as some of the other arguments. I'd like to > >make it a web service but not sure if possible. (Documentation for this > >stuff seems kinda limited on MM, though I might just be looking in the > >wrong places.) > > > >Cutter > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

