pf » CFFUNCTION and CFARGUMENT don't support new types in ColdFusion 7

CFFUNCTION and CFARGUMENT don't support new types in ColdFusion 7

coldfusion

One thing I just realized today - that is a bummer, is that the new types supported by cfparam, and IsValid (eg integer, email, zipcode) in ColdFusion 7 are not supported by the returntype attribute in CFFUNCTION, and not supported in the type attribute of CFARGUMENT. Whats up with that?



Related Entries
This entry was:

Trackback Address: 322/EFB548E26FFE413AD140AC5C99890B0F
On 04/13/2005 at 5:26:30 PM MDT Uwe Raddatz wrote:
1
That's exactly what I suspected half a year ago (see my comment at http://www.forta.com/blog/index.cfm?mode=e&entry=1386 ). :(

On 04/14/2005 at 9:29:38 AM MDT Mike Nimer wrote:
2
We thought about this, but realized there was one problem with it. WebServices. The cfargument types need to be converted to wsdl types when you ask CF to convert the CFC to a webservice. And wsdl doesn't have an email type or a regex type (with your custom pattern), for example.

This is one reason for isValid(), so you can still run validation inside your cfc methods as needed.

On 04/14/2005 at 9:37:36 AM MDT Pete Freitag wrote:
3
Thanks Mike, that makes sense. Though, some of the types such as integer are WSDL types, and would be useful to be able to specify.

On 04/14/2005 at 10:44:11 AM MDT Mike Nimer wrote:
4
your right. I'll submit an enhancement list to see if we can't add a few of them.

On 04/14/2005 at 10:46:17 AM MDT Pete Freitag wrote:
5
Thanks Mike!

On 04/14/2005 at 11:38:52 AM MDT Uwe Raddatz wrote:
6
How about conditional type attribute options for cfargument tag dependent on cffunction's access attribute? So you could use the new validation types for all functions except such that are used for a webservice.

On 04/20/2005 at 3:42:20 PM MDT Ray Horn wrote:
7
This is a non-problem when coding using <cfscript> functions such as inside components because ColdFusion doesn't care what the types of variables are when processing <cfscript> return types or the like.

I can post samples to demonstrate this if necessary...

On 04/27/2005 at 4:53:39 PM MDT Jordan Clark wrote:
8
Hey Mike, when you convert the CFC to a webservice, why don't you just simplify the new type to whatever it could generically fit in, like a email & zipcode are strings. Then in the generated webservice code automatically call the equivilant of isValid() for the additional validation, instead of making developers repeat the same steps manually in cfml?

Jordan Clark




  



Spell Checker by Foundeo





Subscribe to my RSS Feed: solosub RSS
Tags