Questions tagged [cfc]

ColdFusion Components (CFCs) are objects in the ColdFusion environment. They are a collection of functions and properties.

ColdFusion Components (CFCs) are objects in the environment.

A component method is invoked in the following ways:

  • In the <cfinvoke> tag (Transient objects)

  • In the <cfobject> tag

  • In a URL that calls a CFC file and passes a method name as a URL parameter

  • By using createobject() in <cfscript> or in <cfset>

  • via web services

  • From code

Unlike normal ColdFusion files, CFCs have a .cfc extension.

458 questions
6
votes
2 answers

Components mapping in Railo

I would like to put all of my CFC into /components folder and be able to call them from different places in application eg. from /forums/index.cfm. How would I go about setting the mappings?
Eleeist
  • 6,401
  • 10
  • 47
  • 72
5
votes
2 answers

where does a CFC get it's Application Scope

I have a group of CFC's that I access from two seperate Applicaiton scopes. One /Application.cfc is in the Root. The other Application is in /Admin/Application.cfc The cfcs are in in /_cfc/ If I call a cfc (using createObject())from a page in (for…
Jason
  • 1,865
  • 2
  • 19
  • 32
5
votes
4 answers

How can I secure ColdFusion CFC Web Services?

I am in the process of creating a simple Web Service for a Client of our's who wants the ability to retrieve shopping cart information and add/update items in the cart. I have written a CFC with a remote method for each. Now, obviously when these…
Eric Belair
  • 10,296
  • 13
  • 70
  • 107
5
votes
1 answer

Can cfmodule return values to caller's local scope?

Inside the cfm of the cfmodule, values are returned through the use of Caller scope. If I call a cfmodule inside a function in a CFC, Caller maps to the Variables scope of the CFC correct? Can I return the values into to local scope of the CFC…
Henry
  • 31,972
  • 19
  • 112
  • 214
5
votes
4 answers

Are ColdFusion CFC's very secure when access is remote?

I am using ColdFusion 9 and jQuery. I am new pretty new to using ColdFusion CFCs via CFAJAXPROXY. I am curious as to whether my database is at risk and how I might easily patch security holes. I put this at the top of the page:
Evik James
  • 9,645
  • 15
  • 67
  • 118
5
votes
9 answers

ColdFusion: Is it safe to leave out the variables keyword in a CFC?

In a ColdFusion Component (CFC), is it necessary to use fully qualified names for variables-scoped variables? Am I going to get myself into trouble if I change this:
Patrick McElhaney
  • 52,844
  • 37
  • 123
  • 157
5
votes
2 answers

How to manage CFC's (subsystem) that's shared across multiple sites?

How can you manage something like that? I tried my best to design the subsystem to be reusable, but there are just certain things that are unique to the site that have to be customized (e.g. fields in Account entity, or cfc="" in orm annotation). I…
Henry
  • 31,972
  • 19
  • 112
  • 214
5
votes
4 answers

When to var scope your variables in ColdFusion components?

(a) What cases should you var scope variables and (b) what cases should you not var scope in a ColdFusion components?
Mike Henke
  • 854
  • 1
  • 8
  • 22
5
votes
2 answers

How to conditionally pass arguments to an instance of a CFC?

I am currently using the tag to invoke CFCs and pass them arguments. This is really convenient because I can use tags to pass in only the parameters that I want like such:
volume one
  • 5,494
  • 7
  • 39
  • 101
5
votes
1 answer

Including interface functions in cfc from cfml files on lucee or railo

I'm trying to add a interface to a cfc that includes some functions in a cfml file however it throws a error with the message "component [...] does not implement the function [..] of the interface" the function it's complaining about is implemented…
Snipzwolf
  • 483
  • 1
  • 8
  • 20
5
votes
2 answers

Date time exception in coldfusion query in cfc and mySQL

I'm moving from an MS Access backend to mySQL. This used to work but now doesn't and I can't figure the problem.
Saul
  • 1,498
  • 5
  • 23
  • 41
5
votes
3 answers

How Do I Parse JSON Return From ColdFusion CFC?

I've simplified this code for the ease of explanation. I have a cfm page where the user clicks on a table row and gets an ID. I want to send that ID to a CFC, run a query there, and return the results back to the cfm page. Here's what the JQuery…
madvora
  • 1,607
  • 6
  • 27
  • 44
5
votes
2 answers

How do I pass an argument to a CFC through AJAX?

I'm using the following scrip to call a CFC function: function loadQuery() { $.get('QueryData.cfc',{},function(GetMyData){ $("#content").html(GetMyData) }) return false } $(document).ready(function() { …
Mohamad
  • 32,727
  • 31
  • 131
  • 208
5
votes
3 answers

How does Coldfusion's createObject() function search for an component?

I'm having some problems understanding the createObject() function, which the documentation says is used like CreateObject("component", component-name). In the documentation, it is mentioned that Coldfusion searches for the component in "Directories…
Deepak Kumar Padhy
  • 3,296
  • 3
  • 33
  • 70
5
votes
3 answers

How do I reset application.cfc without resetting the server instance?

Possible Duplicate: restart application without restarting server? How do I reset a Coldfusion Application / application.cfc without resetting the Coldfusion Server instance? If I remember right, there are a few tricks out there such as creating…
Dan Sorensen
  • 10,465
  • 18
  • 65
  • 98
1 2
3
30 31