Click to search Andy Jarrett.co.uk RSS feed

Loading Twitter

FW/1 and redirect in the application.cfc

Chatting with AJ Mercer this morning (his evening) on getting redirect() to work in the Application.cfc for Framework One (FW/1). The code being he was using looked perfectly fine:

view plain print about
1rc.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

As I said this looked fine and works in the controllers but in the Application.cfc we just saw "&fw1pk=[some number]" appended to the URL. The fix was quite simple. The variable/structure RC is set as a shortcut to the Request.Context for the controllers but in the Application.cfc you need to reference Request.Context directly. The meant the above code changed to:

view plain print about
1request.context.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

and all worked fine.

As a side note the fix for this came from it being such a simple framework to hack in to and see whats happening over others with multiple core files and components. Recently my work ethics has changed a lot and in its place 2 components now stand, convention over configuration and simplicity both of which FW/1 fits the bill. So if you haven't spent 30 minutes looking at it do so and also check out the Google group at http://groups.google.com/group/framework-one

Comments Comments (0) | Print Print | Send Send | 1191 Views

CFEclipe 1.3.6 bug fix release

CFEclipse has released version 1.3.6 earlier. All bug fixes no new features on the 1.3.5 release. You can read more at http://www.cfeclipse.org/update/web/doc/intro/doc/new.html

Comments Comments (0) | Print Print | Send Send | 887 Views

Using RegEx to cut down on code

I sometimes forget how useful/powerful RegEx can be. Take the following bit of CFIF logic

[sourcecode language="plain"] <cfset username = trim(form.uname) /> <cfif len(username) LT 4> <cfset errorMsg = "Your username is too short" /> <cfelseif NOT reFindNoCase("[\w]", username, 1, "false")> <cfset errorMsg = "Your username is too short" /> </cfif> [/sourcecode]

A quick regex guide: the "\w" reference stands for "word character", which translates to [A-Za-z0-9_] n.b.the underscore as well

You can actually add on to the regex and at the same time cut down a lot of the logic by doing the following:

[sourcecode language="plain" gutter="true" toolbar="true" wraplines="true"] <cfif NOT refindnocase("[\w]{4,}", username, 1, "false")> <cfset errorMsg = "Usernames must be 4 characters in length and contain [A-Za-z 0-9 _" /> </cfif> [/sourcecode]

The key is "{4,}". Using the curly braces to specify a specific amount of repetition of "word characters" and is equivilant to "len(username) LT 4"

Comments Comments (2) | Print Print | Send Send | 410 Views

CFEclipse 1.3.4 released

With the annual release of Eclipse Galileo the CFEclipse team have pushed out its latest release of CFEclipse 1.3.4!.

This update brings compatibility with Eclipse 3.4 and Eclipse 3.5 along with:

  • An updated CF8 Dictionary
  • Some mild updates to the parser
  • Mark occurrences of selected words (tag/variable/method/etc)
  • Integration with Eclipse's DocShare (optional)
  • Preference for modifying the browse url on unit tests to run unit tests
Thats just the tip of the iceberg though, check out the full list here

Available from the update site get it now http://www.cfeclipse.org/update

Comments Comments (2) | Print Print | Send Send | 372 Views

My blog has moved

Please update your bookmarks and feeds for my site.

I now have a Mango Blog at:

http://www.andyjarrett.com/blog

Feed URL: http://feeds.feedburner.com/andyjarrett

Comments Comments (0) | Print Print | Send Send | 1261 Views

CFEclipse and Adobe CF Extensions in one download

In the first part of this 2 parter I mentioned the differences between the 2 ColdFusion plugins for Eclipse that are out there. Here I have put them into one zip file for you to download and install, it really couldn't be easier to check out the CF environment "everyone is using"*

Update: After a quick read of the EULA from Adobe, it appears that I was being a little naughty by bundling them together. Hence the quick removal/update of the original post (anyone who got here first was lucky). That doesn't mean that you still can't have a cracking CF dev environment. The zip I produced was files taken from 2 sources: Eclipse 3.3 and the ColdFusion Extensions for Eclipse and the CFEclipse download section of the site.

[More]

Comments Comments (2) | Print Print | Send Send | 4594 Views

Difference between CFEclipse and CF Extensions

This post is in two parts as I realised it's probably not good to bombard you with one longgggg post. The second part (which is the reason this post even exists) is about a new zip file that I have put together so you can download CFEclipse and Adobe CF Extensions in one go. This post first off covers the difference between them so you know what you are getting and why you want it;

Incase you don't know the CF Extensions are very different to the CFEclipse plugin for Eclipse but both are essential for your CF development environment.

[More]

Comments Comments (1) | Print Print | Send Send | 5928 Views

Eclipse local help system

Update: This appears to be on a different port for others. As Jax pointed out you can go: Eclipse, select Help -> Help contents to get there as well :o)

I was just going into some help files of Aptana when I came across the local address for the Eclipse Help system at: http://127.0.0.1:58041/help/index.jsp

In there was a wealth of information I just didn't know was on my hard drive ... though I suppose it depends on what plug-in's you've got installed but for me I had:

[More]

Comments Comments (2) | Print Print | Send Send | 3835 Views

Update CFEclipse mailing lists

Mark Drew has posted a list of the updated and current CFEclipse mailing lists.

He does mention that anyone who is still on the Tigris lists needs to unsubscribe as they will soon be deleted.

Comments Comments (0) | Print Print | Send Send | 2356 Views

Ant: Copying files and directories

I know that I've done a post on copying files with Ant, but I really want to take this further and into more detail. To save my fingers a lot of the text below is taken from my first post as moving and copying directories/files is a similar command in principle.

I also want to mention that I am running all my Ant tasks via Eclipse and not the command line. If there is a demand to know how to install Ant and run it from the command line I'll do that post separately. At this point I'm assuming you've got Eclipse and you know you way around it enough? Before we do begin you will need to ensure that you can see the Console 'View', you can get to this by going to:

[More]

Comments Comments (4) | Print Print | Send Send | 21443 Views

Ant: Moving files and directories

First off I wanna say that I'm running all my Ant task via Eclipse and not the command line. If there is a demand to know how to install Ant and run it from the command line I'll do that post separately.

So, what is Ant? Well to steal a quote from Mark Drew, think of Ant as .bat files on steroids. You use XML to describe a set of commands to run a whole range of tasks to do anything from SVN/CVS checkouts, unit tests, FTP, emails, sql, moving/copying folders/files generally just name it!

In this guide I want to cover creating a build.xml file and moving files/folders. I'm assuming you've got Eclipse and you know you way around it enough. Before we do begin you will need to ensure that you can see the Console View.

[More]

Comments Comments (1) | Print Print | Send Send | 9264 Views

Eclipse error logs

If you are ever having trouble with Eclipse or any plugin such as CFEclipse you can always view the "Eclipse error log".

The best way to view these is through Eclipse it self, to see the this goto:

view plain print about
1Window >> Show View >> Other >> PDE Runtime >> Error Log

[More]

Comments Comments (1) | Print Print | Send Send | 12841 Views

CFEclipse shortcut for complete line copy and paste

One of the cool things about CFEclipse is that it's built on Eclipse ... just incase you didn't know that. But with this also means that across all my perspectives (perspectives for non Eclipser's are the equivalent to seperates IDE's) you share shortcuts.

[More]

Comments Comments (2) | Print Print | Send Send | 2963 Views

CFEclipse 2.0?

Can you keep a secret? ... apparently I can't

Comments Comments (5) | Print Print | Send Send | 2639 Views

Mark Drew presentations online

For anyone who didn't make it to Scotch or just want a recap Mark Drew has put some of his recent presentations online. Also included are some recent Adobe Connects(still prefer Breeze) as well, so get on over to check them out.

http://www.markdrew.co.uk/blog/page.cfm/presentations

Comments Comments (0) | Print Print | Send Send | 2284 Views

SnipEx, the new CFEclipse pluggin announced

Mark Drew has started releasing details on Project X. It's name, SnipEx . Yours truly helped out with some of the server side work, along with Robert Blackburn who developed the core of the feature.

Bascially SnipEx is an online library of snippets that can be shared across an in-house developer base or even online users. You create a snippet while working on a project, you then can upload it to a designated server either localy or online, and all other users connected to that server can access/view and use your snippet. One example Mark used was accessing CFLIB from within Eclipse, no need to go to the site and search for the snippet you need. Definitely cool!

Check out Marks site for screen shots and a much better description.

Comments Comments (0) | Print Print | Send Send | 1885 Views

CFUnit and CFEclipse

I did mention back in January that the CFUNIT disappeared from the then current CFEclipse build. Well its back with 1.3. This also means the guide I wrote a while back is now valid again: Running CFUnit in CFEclipse quick guide. I also know it is still works as I've found myself going over my own post :o) Time to start back on those test cases.

Also included in the 1.3 update is the CF Frameworks Explorer and don't forget to check out the intro to this feature on CFE T.V.

Comments Comments (1) | Print Print | Send Send | 2903 Views

CFEclipse mailing list is moving

Incase you didn't know Mark is moving the CFE list off Tigris and over to Google Groups.

Check out the new list at http://groups.google.com/group/cfeclipse-users

You can either join up using your Gmail account, or if you don't want to/don't have one then just send an email to cfeclipse-users-subscribe@googlegroups.com

There is now no excuse for you to NOT be a member!... not that there was one before hand, but you know...... what im saying is ...... JOIN!

Comments Comments (0) | Print Print | Send Send | 2615 Views

CFUnit not in CFEclipse, just yet

I've just had a comment in my CFUnit guide about not being able to find the feature in CFEclipse. This isn't because it is hidden within CFE, but as with all beta's some features/functions never make the final cut. Sadly this time the CFunit feature was one of them.

Don't worry though. It is in the pipeline, and will be coming!

Comments Comments (6) | Print Print | Send Send | 3849 Views

Be ColdFused no more! CFEclipse 1.3 is here

Mark Drew has finally announced that CFEclipse 1.3 is here. Not only do we have an updated editor, but the the site has been radically updated as well.

Start downloading now!

Comments Comments (2) | Print Print | Send Send | 2136 Views

More Entries

BlogCFC by Raymond Camden + Twitter @AndyJ + ColdFusion jobs + Contact Me + Snippets/Downloads + RSS .