Aaron Longnion’s ColdFusion Blog

Aaron Longnion’s ColdFusion Blog

Aaron Longnion  //  ColdFusion architect, American expat living and working at www.Peoplexs.com, near The Hague (Den Haag) in The Netherlands

Jan 29 / 2:04am

Got issues with OpenOffice & ColdFusion 9 Multi-server?

There's a bug for that:


I have been contacted by Adobe support from the ColdFusion Bug Database, and they said they hope to fix it for the "next release".

For now, our work-around is to create a "Proxy" CFC that sends all calls (via cfhttp) that need to interact with OpenOffice (such as Word to PDF conversions) to the default "cfusion" instance to do the work. A bit ugly, but not too bad...

Aaron Longnion
Director of Internet Technology
www.PeopleXS.com
www.Twitter.com/aqlong
Join the PeopleXS Community at www.peoplexs.com/communities/nl/


Loading mentions Retweet
Filed under  //  ColdFusion   open office  

Comments (0)

Jan 20 / 7:39am

Ben Forta at CFUG in Amsterdam on 10 March, 2010

I'm excited that I've just been informed by my colleague at Peoplexs, Maurice Crama, that Ben Forta will be gracing us with his presence at our humble CFUGNL in Amsterdam on 10 March, 2010.

Sign up now while there's still room: http://www.cfug.nl/default/index.cfm/agenda/meeting-cfug-maart/

It's of course at Adobe's office in Amsterdam: map.

Loading mentions Retweet
Filed under  //  adobe   Ben Forta   ColdFusion   Holland  

Comments (0)

Jan 19 / 2:11am

Force RPM install of MySQL over old version

I'm not sure if this is smart in all situations, but if you have a borked version of MySQL (5.0 in my case), and want to install a higher version of it, you can use these commands in Linux (RHEL in my case) to force installation on the server- and client- RPM files, assuming those files are in the current directory:

rpm -ivh MySQL-* --aid --force --nodeps --replacefiles

Aaron Longnion
Director of Internet Technology
www.PeopleXS.com
www.Twitter.com/aqlong
Join the PeopleXS Community at www.peoplexs.com/communities/nl/


Loading mentions Retweet
Filed under  //  linux   mysql   redhat   rhel  

Comments (0)

Jan 14 / 11:12am

@mashable, 1/14/10 7:57 PM

Pete Cashmore (@mashable)
1/14/10 7:57 PM
System of a Down Drummer Boy Will Melt Your Face Off [VIDEO] - http://bit.ly/4rwLJi

Sent with Tweetie

Sent from my iPhone

Loading mentions Retweet

Comments (0)

Jan 14 / 12:11am

Check out my HipstaPrint in Rijswijk

Shot with my Hipstamatic for iPhone
Lens: Kaimal Mark II
Film: Kodot Verichrome
Flash: Off

Sent from my iPhone

Loading mentions Retweet

Comments (0)

Dec 31 / 6:38am

New Year's Dive 2009, Dutch-style

trying to work up the nerve to do it tomorrow (2010)... who's with me?!

Loading mentions Retweet
Filed under  //  Holland  

Comments (1)

Dec 28 / 3:15am

Raymond Camden Tip: cfsavecontent and cfinclude within script based CFCs

Ok, so I know that I've said (many times) that including layout in a CFC is generally a bad idea. I still think it is. But like most rules there are always exceptions. Normally this wouldn't be a big deal, but HTML and JavaScript within a script based component is - well - it's ugly. Here is an example:

 case "textbox": {
     return s & '<input type="text" name="#arguments.name#" value="#currentValue#">';
 }

This simple example works, but more complex HTML gets messier. I could have switched the component over to tags. It's not like that would be the end of the world! But then I remember - you can use savecontent within script based cfcs. So instead of the inline HTML you see above, I now use:

 case "event date": {
     savecontent variable="s" {
         include "render/eventdate.cfm";
     }
     return s;
 }

Woot. I wish I had remembered this when I began the project, but I'm guessing I'll be getting used to ColdFusion 9 syntax until right around the release of ColdFusion 10.

This entry was posted on Tuesday, December 22, 2009 at 9:29 PM. It was filed in the following categories: ColdFusion. It has been viewed 901 times and has 6 comments.

TweetBacks

There are no TweetBacks for this entry.

Comments

[Add Comment] [Subscribe to Comments]

  • Comment 1 written by Daniel Budde on 23 December 2009, at 8:09 AM

    avatar
    Although, I am not on CF9 yet, I have ran into this in the past when I wanted to e-mail template based reports from within my CFC. The reports already existed as HTML templates within the application, so the easy fix was to use <cfsavecontent> with a <cfinclude>.

    It always makes me feel a little bad to have to break encapsulation, but as you say, there are those exceptions to the rule. I always just comment them well and since they are few and far between, they have just never caused any trouble.

  • Comment 2 written by Tony Nelson on 23 December 2009, at 9:34 AM

    avatar
    You'll want to be careful when using .cfm mixins inside singleton components to make sure any variables declared within the mixin are thread-safe.
  • Comment 3 written by Raymond Camden on 23 December 2009, at 9:54 AM

    avatar
    Agreed. I'm forcing myself to use local.x for all variables. I normally do NOT like local.foo, I just var scope, but for this component I'm using it as a way to ensure I'm always local.
  • Comment 4 written by Daniel Budde on 23 December 2009, at 9:59 AM

    avatar
    I do the same as well. All my variables used within the template are always located under (LOCAL.templateInfo).
  • Comment 5 written by Tony Nelson on 23 December 2009, at 10:31 AM

    avatar
    If you don't want to have to use local.x everywhere, you could create a small Include.cfc proxy for including templates.

    case "event date": {
             return new Include("render/eventdate.cfm",arguments);
    }

    Include.cfc:
    component {
       public string function init(template, params) {      
          structDelete(variables, "init");
          structDelete(variables, "this");
          structAppend(variables, arguments.params);      
          savecontent variable="local.html" {
             include arguments.template;
          }
          return local.html;
       }
    }

    Now any variables declared inside render/eventdate.cfm won't bleed into your component.

  • Comment 6 written by Raymond Camden on 23 December 2009, at 10:32 AM

    avatar
    That's slick as crap. Thanks Tony.

[Add Comment] [Subscribe to Comments]

read the comments on Ray's blog, too. Cool code there, too.

Loading mentions Retweet
Filed under  //  ColdFusion  

Comments (0)

Dec 28 / 3:07am

TweetTicker: read Twitter Atom/RSS with NewsTicker and ColdFusion

Loading mentions Retweet

Comments (0)

Dec 24 / 6:17am

Happy Holidays: Gil Evans Orchestra featuring Miles Davis 1961

Don't know why, but this puts me in a holiday mood. Relax and enjoy some of the best music of all time...

Loading mentions Retweet

Comments (0)

Dec 21 / 11:36pm

Norah Jones and Jimmy Kimmel Sing YouTube's 12 Days of Christmas

Loading mentions Retweet

Comments (0)