coldfusion

Scheduling a Task in Railo

I recently decided to move one of my simpler apps over to Railo. So far so good. One Problem, it's a scheduled task. How/where does one set them up? Under Railo Express I clicked in Tasks under both administrator and web admin sites, and no dice.. It only seems to show tasks which did not exceed ala an exception list. I just want so...

ColdFusion loop through struct with key evaluation fails! What am i missing?

I have this code in my cfm, which works <cfif not StructIsEmpty(form)> <cfset larray = user.getArray() /> <cfloop collection="#form#" item="key"> <cfif left(key,4) eq "UPD_"> <cfset x = listLast(key,"_") /> <cfset y = evaluate(0,key) /> <cfloop index="j" from="1" to="#arrayLen(larray)#"> <cfif (larray[j][1] eq x) and (l...

Overwriting/redirect a Request in Coldfusion using modelglue

Hi aLL, Actually its related to authentication. my scenario is as following: I have a homepage, where user can see some news n other stuff, also there are text fields for user to enter the login info and get logged in. Now if user is not logged in i want to restrict him to see the details of news. and whenever user click on any of the l...

Coldfusion - variable field name when looping through database query results

I have a set of column names in a table - e.g. foo1, foo2, foo3, foo4. I want to refer to these column names dynamically through a loop: <cfloop index="i" from="1" to="4"> <cfset foo = Evaluate("query.foo" & i)> </cfloop> The above doesn't work - ColdFusion throws a "variable not defined" error, even though query.foo1 is a valid ref...

Stop ColdFusion from sorting my structs/arrays

I have data represented in CF as an array of structs e.g.: var foo = [{key = 'bar', value = 'baz', ... }...]; This structure gets iterated over sequentially and then translated to another related struct which looks like: foo2[key] = {key = 'bar', value = 'baz', ...}; This is then sent to the SerializeJSON() method and sent to the b...

Using different version of iText with ColdFusion

We are using ColdFusion MX7. The CFDOCUMENT tag uses iText for the PDF creation so the whole of the iText library is included in the standard CF deployment. The problem I'm having is that I want to use a version of iText that is newer than the one included in CF7. I need to keep CFDOCUMENT functioning, so simply changing the jar file ...

When should I use # in ColdFusion?

This has been one of the biggest obstacles in teaching new people ColdFusion. When to use # is ambiguous at best. Since using them doesn't often create a problem it seems that most people gravitate to using them too much. So, what are the basic rules? ...

How to specify only some optional arguments when calling function in ColdFusion?

I have a ColdFusion function "foo" which takes three args, and the second two are optional: <cffunction name="foo" access="public" returntype="any"> <cfargument name="arg1" type="any" required="true" /> <cfargument name="arg2" type="any" required="false" default="arg2" /> <cfargument name="arg3" type="any" required="false" d...

how can i debug javascript code within a coldfusion template(a coldfusion page) using visual studio 2008

hi everyone, i know i can debug an asp.net page in visual studio 2008, because visual studio knows asp.net pages. but i'm developing coldfusion based application now, and i'm curious whether i can use visual studio to debug the js code in coldfusion pages. thank you in advance. ...

Can I use an included third-party jar outside of ColdFusion

We have ColdFusion MX7 which uses ICEBrowser behind the CFDOCUMENT tag to render HTML. We would like to use ICEBrowser for some other Java work but it has been discontinued and seems like a bad purchase. I could simply link to the ICEBrowser jars in the ColdFusion directory but that seems like it may be a licensing issue? Those are th...

Is it possible somehow to exclude files with cfdirectory?

When using cfdirectory, how could I exclude all cfm files and list all others without specifying the file extensions for all files I want to see, or exclude a specific file like index.html without doing a query of query? I'm looking for something like the following, notice the filter attribute. <cfdirectory directory="#ExpandPath('./')...

Long Polling on IIS

I developed a progress bar widget in CF and it works wonderfully on my local machine running on a built-in CF8 development server. However, our production and staging boxes are running Win2k3 and IIS which I can't get to respect the CFFLUSH tag. Even padding the buffer with responses doesn't work too well as it is rather unpredictable wh...

How to update the max loop length if the length gets smaller in the loop body?

I have the following array. <cfset ItemHasUsers = arrayNew(1)> <cfloop query="qReadData"> <cfset ItemHasUsers[qReadData.currentrow]["ID"] = qReadData.ID > <cfset ItemHasUsers[qReadData.currentrow]["Asset"] = qReadData.COUNTOFITEMS > </cfloop> I get some records from my database which i put into a table and which manipulate through a...

How to validate characters ONLY in ColdFusion CFForm?

I've got a very simple cfform with a single form field: <cfform action="asdf.cfm" method="post"> <cfinput name="fieldName" type="text" size="20" maxlength="20" required="yes" validate="regex" pattern="[A-Za-z]" message="Only characters are allowed." /> <input type="submit" name="btnSubmit" value="check" /> </cfform> Theoretically,...

IE6 Z-Index Difference Between 2 Servers

So, I have 2 servers that serve pages. I am running ColdFusion on Windows Server 2003 with IIS6. I created the site and synchronized the files between the 2 servers. In the right hand side of my site is a popup div for the search. On Server1 in IE6, this div works perfectly, on server 2 it gets cut off. Due to the synchronization so...

coldfusion problem about onRequest method in Application.cfc

hi everyone, i was blocked by a coldfusion problem, any suggestions are appreciated. now lemme decribe my problem. i have an Application.cfc in my website root, the content in it is as follows: <cfcomponent output="false"> <cffunction name="onRequest" returnType="void"> <cfargument name="thePage" type="string" required="true...

what is the difference between cfproperty tag defined variable and the variables scope variable in coldfusion?

What is the difference between cfproperty tag defined variable and the variables scope variable in ColdFusion? I have Java language experience, can you compare the ColdFusion cfproperty variable, variables scope variable to the Java instance variable and class variable? greate thanks! ...

Is it possible to undefine a variable in ColdFusion?

Is it possible to undefine a variable in ColdFusion? For example, something like this: <cfset myVar = "lsajflksd" /> <cfoutput> <p>myVar is Defined? #IsDefined("myVar")#</p> <!--- Prints YES ---> </cfoutput> <cfset Undefine(myVar) /> <!--- Doesn't exist... ---> <cfoutput> <p>myVar is Defined? #IsDefined("myVar")#</p> <!--- I want i...

Flickr group pool photos - how to download all group photos

Our family has created a Flickr group in honor of a recently deceased relative. We are planning to show the group pool slideshow at her memorial service. The flickr slideshow functionality is great, but it does not auto loop. Plus randomizing photos within a large group pool does not seem to be easy. I'd like to just download all the g...

question about ColdFusion component constructor name

hi all, i have some questions about constructors in ColdFusion : must i use the name init as the constructor name? if i create an instance of the component without invoking the init method, what is returned? instance=createObject("component","cfcName"); // what value now instance hold can i take the code in the init method out and d...