Blog  |  Contact  
Documentation Customer Center  
What is Railo?
Pricing
Editions
Compatibility
Enhancements
What's new?
Tags
New Tags
Enhanced Tags
Application
Data & output
Extensibility
File management
Flow control
Page processing
Functions
Language & syntax
Resources
Other improvements
FAQ
Installation
Performance
Apps & frameworks

Data & output

This page contains a description of all changed tags regarding data retrieving and output.

cfcache

The tag cfcache has been enhanced with a certain functionality. Normally the tag caches a complete page depending on the contents of the url and form scope. In Railo 3.0 you can now use the opening tag CFCACHE with the closing one in order to cache parts of your output. So for instance if you want to cache the header of your application you can do this in the following way:

<cfcache action="content" timespan="#createTimeSpan(0,0,15,0)#">
  <cfinclude "header.cfm">
</cfcache>

This caches the output of the file header.cfm for 15 minutes. It will be stored as a file in the WEB-INF/railo/cfcache folder and will be read from this file for the next 15 minutes. In addition to the environment state (url, form etc.) you can use the "key" attribute to generate a key like you wish. This key could for instance be something like serialize(request).

cfdocument

The popular tag <CFDOCUMENT> (<CFDOCUMENTSECTION> and <CFDOCUMETITEM>) is available since Railo 2.0 and offers some improvements to the well known features. Next to the possibility to define a proxyserver and a corresponding proxyport, there are other attributes, which boost the flexibility of the tag.
The attribute "src" and "srcfile" can not only convert text based contents into PDF, but even images and existing PDF dokuments. Converting PDF's into PDF's might at first glance not make a lot of sence, but the following example should show the options you have using this feature:

Example:
<CFDOCUMENT filename="ab.pdf">
<CFDOCUMENTSECTION srcfile="a.pdf" />
<CFDOCUMENTSECTION srcfile="b.pdf" />
</CFDOCUMENT>

This example for instance concatenates two PDF documents into one new, which contains the content of both PDF's.

Create your own index by using the H1 - H6 HTML tags.
In addition in Railo 3.0 we introduced the boolean attribute htmlbookmark which converts the H1-H6 headlines into bookmarks of the document. This is a very helpful functionality.

Example:
<cfcontent type="application/pdf"><!---
---><cfheader name="Content-Disposition" value="inline; filename=test.pdf"><!---
---><cfdocument format="pdf" bookmark="true" htmlbookmark="true">
<h1>Susi</h1>
My Susi description text
<h2>Peter</h2>
Funny
</cfdocument>

cfdbinfo

Next to the full CFML standard functionality Railo 3.0 supports the new type "users" which returns a list of all database users to the passed database.

cfdump

For the tag <cfdump> the new attribute "eval" was introduced, which can be used instead of the attribute "var".

The attribute "eval" recieves a string as an entry, which is interpreted and used as a label for  dump.

Example:
<cfdump eval="structCount(form)">
equal to
<cfdump var="#structCount(form)#" label="structCount(form)"> 

Next to supporting all CF8 attributes, CFDUMP now supports the attribute abort="true", which instructs Railo to abort the request after the dump. You can even write it as in the example below:

Example:
<CFDUMP abort eval="request">

In addition as a goodie, if you hover over the label of a dump output, Railo displays the code line and the file where the dump was produced:

cfhttp

This tag has been enhanced with the attribute "addtoken" (starting from version 2.0.0.018).
When this attribute is set to "true", the request cookies "cfid, cftoken, jsessionid" will be added to the request so that a request will be automatically recognized beeing from the same session. This can be compared with the behaviour of the tag CFLOCATION.

Example:

<cfhttp addtoken="yes" url="http://www.railo.ch/en/index.cfm">

cfquery

The tag CFQuery comes with a new attribute called "PSQ", which contains a boolean value  determining  whether in the body of the CFQuery-tags single quotes automatically will be escaped or not.
Valid values are TRUE or FALSE.

Example:
<cfset sql="select * from Users where name='susi''s'">
<cfquery ...PSQ="false">
   #sql#
</cfquery>

This  can be installed globally by setting it in the Railo administrator under services / datasource.

Even though not documented, the CFML standard CFSTOREDPROC supports the following attributes:
  • cachewithin
  • cacheafter
  • cachename
Railo 3.0 now supports them as well.

cfflush

The tag CFFLUSH can even be used inside a CFTHREAD tag in order to follow the process of a thread. The results in this case can of course interfer with the output generated outside the tag CFTHREAD

cfpdf

The tag CFPDF has a couple of enhancements in comparison to the CFML standard in order to offer more flexibility.

Railo offers you the additional attribute filter that gives you more flexibility when merging several PDF documents from a certain directory. It works exactly as the attribute filter of the tag CFDIRECTORY.

When deleting pages from a PDF document existing bookmarks are deleted as well when they point to a deleted page.

cfselect

The CFSELECT tag now offers the boolean attribute casesensitive which defines whether an option is selected based on a case sensitive matching of the value or not.

cfsilent

The tag cfsilent comes with a new attribute called bufferoutput since version 3.0.1.003. The reason for this is that Railo eventually might output the data generated inside a CFSILENT, since when having the following code:

<cfsilent>
  <cfoutput>This code is visible</cfoutput>
  <cfabort>
</cfsilent>

An abort outputs the data generated so far even though it is encapsulated inside a <cfsilent> tag. Not here comes the usecase for the new attribute. If you do specify the attribute bufferOutput and set it to false, then the output is not visible. Then Railo writes it into the dev null device. This is not only much faster, but it saves memory as well. We will add a radio button to the Railo Administrator which will allow to set the default behaviour of <cfsilent> and output="no" (this will follow in one of the next patches)  inside a cffunction. So the code like follows:

<cfsilent bufferOutput="false">
  <cfoutput>This code is not visible</cfoutput>
  <cfabort>
</cfsilent>

Then the line "This code is not visible" will not be displayed. It is a different behaviour than in the CFML standard, but since you can use it or not and since in the Railo Administrator you will be able to define it's default behaviour to meet the standard, it is not considered as incompatible to the CFML standard.
Suggestions?
If you have any suggestions regarding the functionality of Railo, you are welcome to contact us with your proposals and whishes.
Suggestions
Railo 3.0 is free
Next giant step with Railo. By releasing Railo 3.0 the gap to the CFML standard is even closer.
Railo 3.0 Community is available for free without any restrictions in use.
read more
Railo Express (Live version)
Try Railo. Just download and play.
No installation necessary
Railo Express