coldfusion

Does ColdFusion have a short syntax for creating a struct?

Is there any "short" syntax for creating a struct in ColdFusion? I'd like to replace this verbose code: <cfscript> ref = StructNew(); ref.Template = "Label"; ref.Language = "en"; stcML = GetPrompts(ref); </cfscript> with something more like a JavaScript object: <cfscript> stcML = GetPrompts({ Template: "Label", Language: "...

Coldfusion ORM Large Tables

Say if I have a large dataset, the table has well over a million records and the database is normalized so theres foreign keys and stuff. Ive set up the relations properly and i get a list of the first object applications = EntityLoad("entityName") but because of the relations and stuff the page takes like 24 seconds to load, even when ...

Creating BlackBerry method stubs using wscompile on WSDL from ColdFusion

I have been working on a BlackBerry application that consumes web services from ColdFusion 7. The Java ME SDK and the Java Wireless Toolkit both require that the generated WSDL be of the document/literal type. Fortunately, I have input on the web service development so I tried setting 'style="document"' in the cfcomponent tag. This gene...

Directory Listing Denied:This Virtual Directory does not allow contents to be listed.

Hello! I am getting an error while trying to run CFmx code on a remote host. Directory Listing Denied This Virtual Directory does not allow contents to be listed. I did my coding on my "LocalHost". Then for testing ,I copied it to a remote host "ChicaDevTestApp" to a folder “D:\inetpub\wwwroot\Aug20\Ap...

Flex coldfusion and multiple remote objects

i am tring to load multiple tables on a flex page and cant seem to figure out how to use multiple remote objects. Below is my coldfusion <cfcomponent output="false"> <cffunction name="getVacancies" access="remote" returntype="query"> <cfset var = qRead ="" /> <cfquery datasource="sqlexpress" name="qRead"> SELECT Status, S...

Dynamic tablename in DAO.cfc?

I'm writing a subsystem that tables might be renamed from project to project. Instead of asking the user of my subsystem to search & replace before using it, does this work? <cfquery name="local.foo" datasource="#dsn#"> SELECT col1, col2, col3 FROM #tableName# </cfquery> Without <cfqueryparam>, will it become non-cacheable? or an...

convert from mysql datetime to coldfusion datetime

Is anyone aware of a simple way to convert mysql datetime values to coldfusion datetime values in CF8 (and it may have to be backwards compatible with CF6)? I need to store date times in mysql and have chosen to store them in mysql datetime format so I can get the db to do date ranges and comparisons for me. I could so this stuff in CF,...

Coldfusion - Getting Massive Error Reports - No Problems Indicated By Users

Ok, here is the background. We have a clustered environment setup for running our coldfusion server, it basically split into two different instances, that the generic address redirects requests to. I have my app setup to send me emails whenever an error is caught by a user. Over the last week or so, I have had cases, where I have receiv...

validating 1 input of multiple inputs using jquery

I've got multiple input fields where they have the same class names. I need to check to make sure at least 1 of them isn't empty. So I've got, $('form[name=expForm]').submit(function(){ var msg = ""; var found = false; $('.date-mask').each(function(){ if($(this).val()){ found = true; } }); if (found != true) { msg += "P...

Do many old ColdFusion Performance admonitions still apply in CFMX 8?

I have an old standards document that has gone through several iterations and has its roots back in the ColdFusion 5 days. It contains a number of admonitions, primarily for performance, that I'm not so sure are still valid. Do any of these still apply in ColdFusion MX 8? Do they really make that much difference in performance? Use co...

How to call a function later at a scheduled time in ColdFusion?

<cfschedule> can only call an URL. What can I use to call a function with some dynamic parameters later? the only way I can think of is to call it the GET way with and populate the parameters in url scope: ./someAction.cfm?param1=xx&param2=yy However, this doesn't work for me 'cause I will likely hit the GET limit for large, compl...

ColdFusion Event Gateways in Clusters

When clustering instances of Coldfusion, how do the event gateways respond? Do the requests also get distributed among the clutster? Or is it per instance? Thanks, Faisal Abid ...

REGEX Help for Coldfusion - In a URL, removing the ? And everything after

I'm looking for some REGEX help Given the following URL: http://news.cnet.com/8301-13924%5F3-10315534-64.html?part=rss&amp;subj=news&amp;tag=2547-1%5F3-0-20 What is the REGEX to obtain the following: http://news.cnet.com/8301-13924%5F3-10315534-64.html Thus removing the ? and everything after it Thanks, B ...

cf.registry file with different sizes

Hi there. We have a web application with load balancing in two machines with a java server(tomcat), ColdFusion and Apache in front. Some time ago we notice that the cfregistry file have different size in both servers: 89Mb in one and 44Mb in other. It's normal to have this size? It's normal they had the size so different? Thanks in a...

inetpub wwwroot missing folders

Hello! I am testing a CFMX code by placing it on a remote desktop, and working on it form my local host. There is an existing folder "D:\inetpub\wwwroot\TEST.com" on the remote desktop. Then ,I placed my code in a folder "D:\inetpub\wwwroot\Aug24\TEST.com”. It was working well a few hours prior. But alas the folder "Aug24\TEST.com" is e...

Using Maven for Coldfusion project

I have to deal with what is pretty ugly and large blob of ColdFusion code which up to this day is maintained by direct modifications on production server (don't ask). I managed to clean it up from dupes and backups and put it into Subversion, now I need tp pick a make system to be able to put this onto continuous build (TeamCity) and als...

Safe to call underlying java method on String in ColdFusion?

Adobe ColdFusion is built on Java. Almost all simple variables in CFML/CFSCRIPT are java.lang.String until the operation needs it to be of a certain type. I've always want to use startsWith() in String instead of the more bulky CFML variant. left(str,4) EQ "test" However, what's the general consensus of using underlying Java method...

Can function argument have hint in cfscript (CF9)?

Can function argument have hint in cfscript (CF9)? CFML style: <cffunction name="myFunc" output="false" returntype="void"> <cfargument name="arg1" type="arg1" default="default" hint="my hint"> ... </cffunction> CF9 cfscript style: public void function myFunc(string arg1='default') { ... } Where to specify hint of the argumen...

Updating table based on Select Query in StoredProc / ColdFusion

I am using ColdFusion for for a project and I have a written a query which I think can be faster using a Stored Proc, but I not a T-SQL person, so I am not sure how to do it to compare. I am running an initial query which selects a number of fields from a table based on a dynamically built cfquery. I think I know how to convert this qu...

Coding conventions for writting cfc's in CF9?

With the new ways of writing CFC in CF9, what are some of the coding convention new to CF9? Here are some I can think of... always use LOCAL scope always include init() method that returns itself, since New will call init() if found. do not put required arguments in init() if it is an ORM entity, otherwise expect Exceptions... always ...