Hi,

I’ve been struggling with a FarCry issue for days now. I want to
extend dmCron so that I can add extra parameters to pass to cfschedule
(e.g. proxy server, proxy port etc.).  This is what I’ve done so far:

Created a new file in my project at /packages/types/ called dmCron.cfc

In it I extend the core dmCron with:

<cfcomponent extends="farcry.core.packages.types.dmCron">

Added additional cfproperty tags for my new fields as well as a couple
of the core ones (frequency and timeout).

I also copied the setData function from the core dmCron so that I
could add the addition parameters to the cfschedule tag.  I changed
the following tag at the end of setData:

<cfreturn
super.setData(arguments.stProperties,arguments.user,arguments.auditNote,arguments.bAudit,arguments.dsn,arguments.bSessionOnly,arguments.bAfterSave)
 /
>

to
        <cfset
application.fapi.setData(stProperties=arguments.stProperties,user=arguments.user,auditNote=arguments.auditNote)
 /
>

And when that didn’t work I also tried

        <cfset
stReturn=application.fapi.setData(stProperties=arguments.stProperties,user=arguments.user,auditNote=arguments.auditNote)>
<cfreturn stReturn>

Then did an Updateapp / deployed via COAPI tools etc.

Now if I try to add a new scheduled task I get errors like:

Attribute validation error for CFSCHEDULE.
The value of the PROXYPORT attribute is invalid. The value cannot be
converted to a numeric because it is not a simple value.Simple values
are booleans, numbers, strings, and date-time values.

Or if remove proxyport from cfschedule

'' is an invalid date or time string.

Ok so my first issue is that I don’t understand why setData function
is being called at this point.  I thought it was only called after the
form was submitted, but obviously I’m wrong.  If I change the cfreturn
tag back to using super.setData everything works except obviously the
new fields are ignored…but why does super.setData not generate the
same type of error about invalid date etc. when first opening a new
dmCron form?

Another more minor issue I’m having is with the existing fields from
dmCron.  In my dmCron I added a new cfproperty tag for frequency and
timeout.

This one works fine (difference is the addition of a 5 minute value):
<cfproperty name="frequency" ftlist="Once:Run once,Daily:Every
day,Weekly:Every week,Monthly:Every month,3600:Every hour,1800:Every
half-hour,900:Every 15 minutes,300:Every 5 minutes,60:Every minute">

This one doesn’t work:
<cfproperty
        name="timeout" title="Timeout (sec)" type="numeric" hint="Time out
period in seconds" required="no" default="60"
        ftfieldset="Settings" ftlabel="Timeout (sec)"
        fthint="Timeout in seconds">

All I was really trying to do was change the label from “timeOut” to
“Timeout (sec)” but it doesn’t seem to matter what I do, I can’t
overwrite the system label.  I did attempt the same thing with
Frequency but also had no luck.

I’m assuming I’m missing something obvious here with both issues.  I’m
using FarCry 6.1.3 on Windows 2008 R2 64bit with CF9 Standard.

Cheers
Mark

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Reply via email to