Hi All,
I have a custom type extending dmFile. This type has generic, sequential
numbering, so I wanted to rename whatever filename someone wanted to upload
to some standard (based on a required input variable). I found the function
"validate" for the formtool ftType="file" and figured that I could simply
extend this within the component definition of the custom type.
However, things don't seem to be working, so the simple question is: do I
actually need to extend the formtool "file" to create a new formtool type
(with the validate function expanded as below) and then use that as the
ftType?
Specifically, I'm looking at the "validate" function, and I added:
<cfargument name="objectID" required="true" type="UUID" hint="The ID of the
object I am considering to get more info">
<cfargument name="typename" required="true" type="string" hint="Typename of
the object in question.">
Then to get object data:
<cfset stObj = createObject("component",
application.stcoapi["#attributes.typename#"].packagePath) />
<cfset stProperties = stObj.getData(objectID = attributes.objectID) />
And to read it out:
<cfset cleanFileName =
"#stProperties.<myNumberingProperty>#.#listLast(newFileName,'.')#"/>
I figured by putting it in the spot where it checks for wierd first
characters, I would always catch the filename and change it.
Thanks,
Tomek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---