Entries Tagged as Features

Calling BIFs with named arguments

March 15, 2011 · No Comments

As of version 3.3.x Railo supports named arguments for Java based build in functions in the same way as it is already possible for user defined and cfml based build in functions. The only difference is that Railo throws a exception if you define an unsupported argument. Here are some examples: <cfset arr=[1,2,3,4]>

<cfset dump(arrayLen(array: arr))>
<cfset dump(arrayLen("array": arr))>

<cfset dump(arrayContains(arr,2))>
<cfset dump(arrayContains(haystack:arr,needle:2))>
<cfset dump(arrayContains(needle:2,haystack:arr))>
<cfset dump(arrayContains(object:2,array:arr))><--- using alias name --->
<cfset dump(arrayContains(o:2,arr:arr))><--- using alias name --->

<cfset dump(listAppend(value:'d',list:'a,b,c'))>

<cfset dump(isValid(type:"string", value:arr))>
<cfset dump(isValid(type:"regex", value:"string",pattern:"*"))>
<cfset dump(isValid(type:"range", value:7,min:1,max:10))>
<cfset dump(isValid(type:"range", value:17,min:1,max:10))>
The implications of this change are that you now don't have to obey the order of the parameters when calling a function. So instead of: <cfoutput>#dateFormat(now(), "mm-dd-yyyy")#</cfoutput> you could call: <cfoutput>#dateFormat(mask:"mm-dd-yyyy",date:now())#</cfoutput> In addition, if some arguments can be omitted and you need to pass in an argument that is at a latter position, you don't have to pass empty or dummy values for the rest of the arguments. Here's a very good example: <cfset cachePut(id:myID, value:myVar, cacheName:"myCache")> For the assignment of the named argument you can either use ":" or "=" as usual.

No CommentsTags: Features · HowTo · New release · Railo 3.3 · Release · Tips

Railo 3.3 BETA released

February 25, 2011 · 5 Comments

Railo 3.3 brings a lot of new features. For us the most important one is Client/Session Scope Storage. Because of its importance let me introduce this feature first.

[Read more →]

5 CommentsTags: cache · Clustering · Configuration · Features · HowTo · Open Source · Railo 3.3

Updated S3 resource

December 15, 2010 · No Comments

As many of you know, Railo has introduced the S3 functionality about 3 years ago and we are very happy that it is adopted in other engines as well. Here are some updated notes on this functionality.

[Read more →]

No CommentsTags: Features · Railo 3.2 · Tips

Fun with <cfloop collection="array">

December 02, 2010 · 2 Comments

Did you know that you can use <cfloop collection="anyarray" key="sthg"> in Railo? This is possible since in Railo both structs and arrays are based on the same basic Java object. So I got a tip from our dev team that <cfloop collection="array"> works as well. So let's try it out.

[Read more →]

2 CommentsTags: Features · HowTo · Railo 1.1 · Railo 2.0 · Railo 3.0 · Railo 3.1 · Railo 3.2 · Tips

Railo Event Gateways

November 18, 2010 · 1 Comment

BIG Thank you to Paul Klinkenberg for taking time to contribute to the Railo wiki and adding the Event Gateway documentation and example.

1 CommentTags: Features · HowTo · Railo 3.2 · Wiki

Cache (Advanced) Part 2

January 26, 2010 · No Comments

In the first part of the cache blog entry we looked at how we can use the cache directly without entering into great detail. Now let's have a look at what the cache is at capable of. Because it provides much more than just storing data.

[Read more →]

No CommentsTags: cache · CFML · Configuration · Extension · Features · Railo 3.1.2

Cache (Basic) Part 1

January 22, 2010 · 9 Comments

Since version 3.1.2 Railo supports the possibility of using a cache. This blog entry will go into the details of this feature. The blog is divided into 3 parts, the first part will deal with the base functionality, the second part show how the cache is used in backend and the last part takes care of specialties when using the cache and shows a reference.

[Read more →]

9 CommentsTags: cache · CFML · Configuration · Features · HowTo · New release · Railo 3.1.2

Railo Tip: CreateObject('java')

January 15, 2010 · 5 Comments

I'm actually hesitant to post this because the Railo team is actually trying to make progress on documentation and we have some new documentation policies in place. However, I know if I don't post this and people eventually find out about it, they'll wonder why they didn't know sooner. This tip pertains to Railo's createObject('java') implementation. I'm told that it has been there for awhile, but I couldn't tell you what build it came from. I'll share the code and go from there.

<cfset object = createObject('java','path.to.package.classtoinvoke','/path/to/jar/file/on/system')>

Read that line 2 or 3 times and let it sink in a little. Yes, Railo's createObject('java') has a 3rd (and 4th) argument. This is the full documentation on this from Michael is:

createObject('java',String className,String paths, String delimiter )
- 'java' (required)
- className (required) - the full class name (class and package) of the class to invoke.
- path (optional) - a list of jar files and directory that contains class files
- delimiter (optional) - delimiter used for the path list (default is comma ",")

Sean Corfield will be presenting this to the opemcfml.org advisory board, whether it gets voted on or not remains to be seen. Also, please note that I'm making Documentation/Wiki a high priority for the year 2010.

5 CommentsTags: Features · Tips

Railo - AJAX Tags

August 27, 2009 · 10 Comments

I have just uploaded Andrea Campolonghi's current RC version of the ajax built in tags. Here's what you need to do in order to install and test the tags.

[Read more →]

10 CommentsTags: Community · Extension · Features · Railo 3.1 · Release

Using the Railo cluster cache

August 02, 2009 · 6 Comments

This is something we wanted to do for more than a year now. We wanted to implement a cache that is reachable from all the servers in a cluster. So here we go...

[Read more →]

6 CommentsTags: CFML · Extension · Features · Railo 3.1