coldfusion

How do you decide what to use: UDF or Custom Tag?

WACK says: If you feel you need to have lots arguments, consider creating a CT instead. ... CT are significantly more powerful and flexible than custom functions. Try to use UDF's for simple matters... Use CT and Components for more involved processes, especially those you can think of as discrete actions rather ...

When Should I Use Java in my ColdFusion Application?

Responders to the question know, of course, that ColdFusion is a Java EE application and can access all underlying Java classes, supports JSP custom tag libraries, etc. But what I want to know is when to write code in Java, compile it as a JAR, and reference it in CFML. This is all in the context of a CF MVC app written in a framework l...

How can I prevent page-break in CFDocument from occuring in middle of content? The style "page-break-inside: avoid" is not being honored.

I am generating a PDF file dynamically from html/css using the cfdocument tag. There are blocks of content that I don't want to span multiple pages. After some searching I found that the style "page-break-inside" is supported according to the docs. However in my testing the declaration "page-break-inside: avoid" does no good. Any sugge...

CSS Parser in ColdFusion or Java?

I'm building something that requires a simple HTML frontend for editing some properties in CSS. However, I need to get the value specified by a CSS file. The only parser I can find is CSS Parser Project , and it is in Java. It implements both Document Object Model Level 2 Style & SAC: The Simple API for CSS API. It should work, but w...

Regex to match all HTML tags and tag content except <p> and </p>

I am looking for a regex to match all HTML tags, except <p> and </p> that includes the tag content. I am developing in ColdFusion. There was an earlier post about matching tags except <p> and </p>, but I need to grab everything between the tags as well. For instance, the following should match in their entirety: <a href="http://www.goo...

Use of CFQUERYPARAM to specify table/column names in SQL

I need to dynamically construct a set of JOIN statements where the table and column names are passed in from another ColdFusion query. When passing the string values to into the statement, CFQUERYPARAM adds single quotes around it - that's part of the point of CFQUERYPARAM. Given that this breaks the SQL statement, is it acceptable not...

Using fusebox 5.5 permissions attribute checking within the .cfm of a fuse

I have a standard user/role setup which returns the current user's roles in a list. I then use the permissions="" attribute and the preFuseaction phase to check whether this user is authorised to access this fuseaction. This allows some blocks of a page to be displayed and some supressed for different users. I cannot do the same thing...

Oracle: OALL8 is in an inconsistent state

As part of upgrading JRun, we are moving from a 1.4 JVM to a 1.6 JVM. Now I am getting a really strange oracle db error: "OALL8 is in an inconsistent state". I have pinned down the problem to insert queries that do not use bind variables at all - all inline parameters. If I run the query without any bind variables, I get the above error....

How to set read only flag on streamed content from web server

Is there a way include or suggest a read only flag as part of a content-disposition: attachment; filename=document.doc or other http header? ...

How do I use SendGatewayMessage to send a message to a Flex consumer?

I have a CFC that occasionally needs to send a message via LCDS/BlazeDS to multiple Flex apps that have a consumer setup. I'm having a hard time figuring out the specific steps to make this work. Using ColdFusion 8 and Flex 3. I know it's SendGatewayMessage but how do I configure? ...

Automatic Documentation of ColdFusion code

Hi, I have inherited over 600 files of ColdFusion source code running a internal web site for my company. One of my tasks is to "document" it. The code base represents about 5 years of development and there is no technical specification of what it does. The developers have maintained a change log of each file and their is a consistent ...

ColdFusion URL property returns button name instead of the required field (ID)

I am trying to create a page that lets a user delete an image if he is logged in. I pass the image ID through the URL when the button is clicked. The problem is it does catch the image ID but when I click delete it passes the value of the button to the URL instead of the image ID. It looks like user_acc_images.cfm?delete=Delete instead o...

Adding a dynamic image to a PDF using ColdFusion and iText

I pieced together some code to insert a dynamic image into a PDF using both ColdFusion and iText, while filling in some form fields as well. After I got it working and blogged about it, I couldn't help but think that there might be a better way to accomplish this. I'm using the basic idea of this in a production app right now so any comm...

Configure 3-tier in coldfusion 8

we are in the process of migrating our coldfusion 8 application from 2-tier application to a 3-tier architecture. can anyone provide an instruction on how to configure the web server and the application server so the applications can communicate. Can using cfcomponent be enough to place all db communication in the application server? ...

Does ColdFusion have an answer to ASP.NET's Master Pages?

I'm working on a website that was coded in ColdFusion. I have a CSS/HTML template I would like to apply to the content of every page, without duplicating any more code than necessary. I've gotten kind of spoiled by ASP.NET's master pages, which would be my preferred way to implement this site. Unfortunately, that option is unavailable to...

Sharing login credentials between ColdFusion severs?

If I have multiple CF8 servers, can a user login on one server, but share the login credential among all servers (no re-login required)? ...

Railo, Tomcat IIS7 and default documents.

I've set up Railo v3.1 using Tomcat v6 - on a Windows 2008 (32bit) server. Everything seems to work fine, except that no matter what I try, I can't get it to recognise my default document (index.cfm) So: http://localhost/index.cfm = fine http://localhost = 404.3 error If I look at the error, it seems that IIS7 is using the static fil...

Flex to CF - URLRequest not posting data

I have a flex form that gathers information using URLVariables, URLRequest and navigateToURL which sends the data to a Coldfusion page that process the information and generates a PDF. Everything is working great for 99% of the user but some are reporting the form is coming up blank. Which makes me believe something on the clients end ...

Nested Class Coercion Fail Between CFC and Flex

I have two AS3 classes, A and B. Class A contains an ArrayCollection that will hold multiple instances of class B. In ColdFusion, I have matching CFCs, with same-named variables in the same order, as well as cfproperty tags for each variable. The AS3 classes both use the RemoteClass metadata to associate them with their CFC counterpa...

How can I make a block of code in a custom tag only run the first time the tag is called?

I'm creating a set of ColdFusion custom tags designed to make reusing certain layout elements easy. I'll be using them in a manner similar to the following: <cfimport prefix="layout" taglib="commonfunctions/layouttags"> <layout:fadingbox> This text will fade in and out </layout:fadingbox> <layout:stockticker> This text will scr...