cfc

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

心不动则不痛 提交于 2020-06-12 05:05:00
问题 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: <cfcomponent> <cfset variables.foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a function local variable"> <cfreturn "I have #variables.foo# and #bar#."> </cffunction> </cfcomponent> to this? <cfcomponent> <cfset foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset

I can't get Internet Explorer to properley refresh my ColdFusion page

寵の児 提交于 2020-01-06 13:28:05
问题 I have made this nice little table: testPage.cfm: <html> <head> <title>Test Page</title> <style> .blue{ background:#66CCFF; padding: 1px 20px; } .red{ background:red; padding: 1px 20px; } .blank{ background:#FFF; padding: 1px 20px; } </style> </head> <body> <cfform> <cfinput type="checkbox" name="filters" value="blue" checked="yes"> Blue <br /> <br /> <cfinput type="checkbox" name="filters" value="red" checked="yes"> Red </cfform> <cfdiv id="content" bind="cfc:TestCFC.displayTable({filters})"

I can't get Internet Explorer to properley refresh my ColdFusion page

筅森魡賤 提交于 2020-01-06 13:27:29
问题 I have made this nice little table: testPage.cfm: <html> <head> <title>Test Page</title> <style> .blue{ background:#66CCFF; padding: 1px 20px; } .red{ background:red; padding: 1px 20px; } .blank{ background:#FFF; padding: 1px 20px; } </style> </head> <body> <cfform> <cfinput type="checkbox" name="filters" value="blue" checked="yes"> Blue <br /> <br /> <cfinput type="checkbox" name="filters" value="red" checked="yes"> Red </cfform> <cfdiv id="content" bind="cfc:TestCFC.displayTable({filters})"

Staging my Coldfusion app when using CFC inheritance/extends

瘦欲@ 提交于 2020-01-06 04:51:32
问题 I have an application.cfc in a subdir of my webroot: /app/application.cfc I recently added another application.cfc in a subdir of that and it extends the original application.cfc using the proxy method described here http://corfield.org/blog/index.cfm/do/blog.entry/entry/Extending_Your_Root_Applicationcfc : /app/mysubdir/application.cfc /app/applicationproxy.cfc The extends attribute for the subdir cfc looks like this: <cfcomponent extends="app.applicationProxy"> This all works fine so far

Help getting, or displaying, random records in ColdFusion from a MySQL query?

流过昼夜 提交于 2019-12-25 06:39:03
问题 I've got a jquery roller/scroller that displays snippets of records returned from my 'Helpful Hints' database table query. I want to keep the scroller to about 15 records but not always the first 15 records. Is it more efficient to write a query like: SELECT * FROM table ORDER BY RAND() LIMIT n Which returns a random result or do I return the whole query and have my ColdFusion component serve up a random number of the query result? The future of my scroller will include random records from my

Accessing Query Data from CFC Function

杀马特。学长 韩版系。学妹 提交于 2019-12-25 02:53:40
问题 Here is what I am up against: I am trying to change the content of a CFDIV based on the selection from a CFSelect box. To do this I have bound the CFDiv to a CFC and I am trying to return two columns from my query that is executed in that CFC; Alert_Status AND Alert_Priority. These values will be queried based on a selection from the CFSelect box in my CFM page. Company_Name is the value passed to the CFC from the selection in the CFSelect box. Once the query in the CFC is run, I would like

404 error - Google attempting to index ColdFusion CFC

回眸只為那壹抹淺笑 提交于 2019-12-23 19:27:25
问题 For months, our IIS/ColdFusion server has been throwing 404 errors during Google crawler scans. Normally it's easy to track these down but in this case, Google is trying to scan our CFC files. The files do exist, but they are not exposed to the Internet - only to the ColdFusion server. Nevertheless, Google is seeing links to the CFCs somewhere on our site and is trying to follow them. Below is a dump of our CGI structure during one of the 404's. baseCFC is a CF Mapping to D:\Domains\[domain]

Differences between New/CreateObject() vs EntityNew() in CF9 for persistent CFC?

纵然是瞬间 提交于 2019-12-23 19:13:41
问题 What are the differences (if any) between New/CreateObject() to create an object vs EntityNew() to create an entity in CF9 for persistent CFC? 回答1: With New() and CreateObject() you need to specify the full path to the CFC. With EntityNew() you just need to pass in the name of the entity. 回答2: quoted from: Learning ColdFusion 9: EntityNew() vs. The NEW Operator / CreateObject() I actually asked this question during the "Advanced ORM" session at CFUNITED and got a slightly different answer.

Coldfusion CFC Return JSON display in Jquery, how do I handle multiple records from CFC and display in Jquery?

半世苍凉 提交于 2019-12-23 14:49:13
问题 I need a way to grab the json return from coldfusion and display it in jquery I can display the first result fine, but if more that one record comes back I am stuck Here is my cfc <cfquery name="users" datasource="#thedb#"> In this query I can get 1 record to 25 or even more results </cfquery> Here is my out put to jquery, not sure if this is a good way to do this, but.... this is how I handle mutliple records right now. <cfset var user = structNew()/> <cfset thenumber = 1> <cfloop query=

Can Coldfusion components share methods without being descendants of the same super class

送分小仙女□ 提交于 2019-12-23 13:02:14
问题 We have used a homegrown version of object oriented coldfusion for a while and I'm just starting to experiment with cfc's and how it "should" be done... If I understand correctly, cfinterface defines the signature of functions, and any class that implements that interface must have their own functions to do whats defined in the interface. I'm kind of trying to do the opposite - the interface doesn't just define the function's signature, but also defines the logic of the function and anything