ft:object small bug with r_stFields?
Phillip Rasmussen <[email protected]> Wed, 22 Jan 2014 14:41:00 -0800 (PST)
| Newsgroups | gmane.comp.cms.farcry.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
FC6.2.10 on linux
Don't know if this is a bug or I'm doing something wrong but...
After a server side validation fails on a form and I want to pull the value
of a submitted field (so I can create a custom select box and use this
value to mark it as selected) i use:
<cfset thePrefix =
replace(application.fc.utils.createJavaUUID(),'-','','ALL')>
<ft:object typename="myForm" prefix="#thePrefix#"
stPropMetadata="#stPropMetadata#" lFields="mySelectField"
key="therecanbeonlyone" r_stFields="test" />
I then get an error:
The string
caller.Request.farcryForm.stObjects.0204781DCB6E034195D8598F646AB09E.MetaData.mySelectField.Label
is not a valid ColdFusion variable name.
Notice the thePrefix value starts with a number. Of course this error
doesn't occur when thePrefix starts with an alpha.
I've resolved the issue by
<cfset thePrefix =
rereplace(replace(application.fc.utils.createJavaUUID(),'-','','ALL'),'^[0-9]{1}','Z')>
This just checks if the first character is a number and then replaces it
with a 'Z'.
Without digging too far into exactly which line is causing the error in
object.cfm I thought it might be pointing out (no doubt somewhere around a
caller function). Perhaps it's worth changing createJavaUUID() to check. I
don't know how many other processes might be suffering the same issue.
Regards
Phil
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
---
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.