A couple of things: You probably *don't* want to call super.setData, since that will just do the standard schedule update, resulting in a duplicate or overwriting yours (not sure which). You should probably copy dmCron (update extends with the full farcry.core path) and make your customisations.
Use argumentCollection with super calls if possible (even if core isn't doing it), it skips the whole which-arguments-are-required-did-i-break-something problem. I'd need to see your code to guess about the proxyport problem. If you're using similar code to core's, then I don't know why you would have a problem with the date. Again, I'd have to see the code to make a guess. The bSessionOnly flag is relevant to editing a new object - FarCry typically puts new objects into the session scope so that things like getData and skin:view can work with this "theoretical" data. Thus the bSessionOnly flag is relevant for stuff that should only be done when saving to the database. Finally, timeout - without playing around with it myself I can only guess. So here are my guesses: 1) changing the property to "numeric" is somehow screwing things up, or 2) the default="60" isn't kicking in, and you're submitting an empty field (to fix that, add ftDefault="60") Blair On Wed, Feb 22, 2012 at 4:54 PM, tHeSmUrF <[email protected]>wrote: > 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 > -- 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
