ColdFusion Community

The online ColdFusion / CFML community website

I have been working with some of my CFCs and was setting a default property for it. I'm using the CFProperty tags and the "this" scope as I'm returning the results to a flex component. I have all of my defaults set up in my cfproperty and "this" scope and was trying to use my "init()" function to return the object. However, each time I tried to access the object, ColdFusion was throwing the error message "5". That's right, just the number 5, nothing else.

Once I had narrowed it down to the init, I saw that I was using #now()# to set a default date, and #session.userId# in the cfproperty tags. Once I removed those calculated defaults in the cfproperty tag, and just left them in the "this" scope, everything worked correctly again. Does anyone know why (even disregarding the "5" error message) using calculated defaults for cfproperty throws errors?

I guess the solution is to just use calculated defaults in the "this" scope, but I wasn't sure the reasoning behind that.

Add a Comment

You need to be a member of ColdFusion Community to add comments!

Join ColdFusion Community

Steven Erat Comment by Steven Erat on April 2, 2008 at 7:12pm
Can you post a code example and the stack trace?
Specialists in ColdFusion Development
Tagged.com

> Place your advert here /h3>

Latest Activity

9 hours ago
17 hours ago
Chandan Kumar added a photo
19 hours ago
19 hours ago
John Farrar About a month ago my second book "ColdFusion 9 Developers Tutorial" hit the press. You can find it on amazon.com and packtpub.com both.
yesterday
Shirak Grigor added a blog post
There are a communication issues between three technologies together Flex, CF, and .Net. The issue is around null values and how each technology treating it. Flex support null values for String, Object, and Dates only as far as my knowledge up to Fl…
on Tuesday
Mark Parratt and Kathy Elliott joined ColdFusion Community
August 24
Discussion, Q&A, and fellowship amongst those interested in the ColdFusion on Wheels framework.
August 23
Thanks Jamie
August 20
This is currently being discussed in the Wheels Google Group: http://groups.google.com/group/cfwheels/browse_thread/thread/832e0a5010f96a53?hl=en
August 20
Jamie Martin updated their profile
August 20
I use layerblue http://www.layerblue.com/ they've been good to me, the are only on cf7 though... but depends what you need.
August 20

Members

  • Paul
  • Tariq Ahmed
  • Francisca Espi Puig
  • Chandan Kumar
  • Pradeep
  • John Farrar
  • Ram
  • Vijay Manickaraja
  • Jan van Hellemond
  • Shirak Grigor
  • Wil Genovese
  • David Harris

Translate this page

© 2010   Created by Nick Tong

Badges  |  Report an Issue  |  Terms of Service

Sign in to chat!