Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfargument now accepts type=integer #1179

Open
pfreitag opened this issue Sep 11, 2019 · 12 comments
Open

cfargument now accepts type=integer #1179

pfreitag opened this issue Sep 11, 2019 · 12 comments

Comments

@pfreitag
Copy link
Member

As of CF2016+ apparently https://trycf.com/gist/dcf63d355df1063831bd485ed0453d8e/acf2016

need to see what other types might be added and confirm when it was added.

@pfreitag
Copy link
Member Author

Looks like float can also be used as an argument type.

@pfreitag
Copy link
Member Author

And email

@pfreitag
Copy link
Member Author

telephone url ssn social_security_number also work.

Possibly all the cfparam types work except for regex which throws a java.lang.IllegalStateException (because it needs the pattern). I tried

<cfargument name="foo" type="regex" pattern="[0-9]{3}">

But still get a IllegalStateException.

@KamasamaK
Copy link
Contributor

Interesting. Adding new types, especially undocumented, seems like it could break backward compatibility in some cases. I'm guessing these would take precedence over components of the same name, though I haven't tested that.

@pfreitag
Copy link
Member Author

Yeah, good point - I haven't tested that yet either, not sure which takes precedence.

Also want to add to the ticket that this only works for cfargument types, does not work for returntype.

@pfreitag
Copy link
Member Author

FYI - a ticket has been added to lucee: https://luceeserver.atlassian.net/browse/LDEV-2471

@mark-demoss
Copy link

mark-demoss commented Dec 1, 2021

Two years on, this feature is still not documented. Is it considered safe and supported for use in CF applications?

Is there any move on Adobe's part to expand support for integer types beyond this limited use? For example, in typed arrays?

@KamasamaK
Copy link
Contributor

I see there's a ticket for Lucee, but I would recommend opening a ticket with Adobe to have these documented.

As for whether they add them to typed arrays, that should be another ticket.

@pfreitag
Copy link
Member Author

pfreitag commented Dec 2, 2021

@KamasamaK I agree. Hey @mark-demoss can you create ticket(s) and post the link back here.

@mark-demoss
Copy link

Will do.

I also have an open support case and will let you know what I hear back.

@mark-demoss
Copy link

@mark-demoss
Copy link

Adobe has updated their documentation:

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-a-b/cfargument.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants