If you create a edit.cfm file in the webskin folder for a content
type, that will become the handler for editing records of that type.
So rather than use the built-in edit handler, you can specify your
own.

I believe, but I am not positive, that I remember someone mentioning a
bug in FarCry that prevents the server side validation from
executing.  You could remedy this by writing your own edit handler and
forcing it to execute the server side validation.

For an example of a custom edit handler you can check out /core/
webskin/dmInclude/edit.cfm or /core/webskin/dmNavigation/edit.cfm or /
core/webskin/dmProfile/edit.cfm

Sean

On Aug 16, 9:59 am, Ron Mast <[email protected]> wrote:
> Hi Sean,
>
> I understood everything but "I think there may be a bug in FarCry that
> prevents the
> <ft:serverSideValidation /> tag from firing.  You may have to create
> your own edit.cfm handler and manually add in a call to
> <ft:serverSideValidation />.  Hopefully someone from Daemon will chime
> in a shed some light."
>
> Can you explain this further...I'm trying to find an example and going
> to scope out ft:serverSideValidation.
>
> Again I am using .failed()
>
> Thanks so much Sean!
>
>
>
> On Fri, Aug 13, 2010 at 2:40 PM, Sean Coyne <[email protected]> wrote:
> > You should be creating your returns struct using the "passed" and
> > "failed" methods like farUser:
>
> > <cfset stResult = createObject("component",
> > application.formtools["field"].packagePath).failed(value="#arguments.stFiel 
> > dPost.value#",
> > message="The userid you have selected is already taken.") />
>
> > <cfset stResult = createObject("component",
> > application.formtools["field"].packagePath).passed(value=stFieldPost.Value) 
> > /
>
> > FarCry automatically invokes the ftValidate* methods for each field
> > (if they exist).  FarCry is a conventions based framework.  Its
> > magic :)
>
> > I think there may be a bug in FarCry that prevents the
> > <ft:serverSideValidation /> tag from firing.  You may have to create
> > your own edit.cfm handler and manually add in a call to
> > <ft:serverSideValidation />.  Hopefully someone from Daemon will chime
> > in a shed some light.
>
> > Sean
>
> > On Aug 13, 12:07 pm, Ron Mast <[email protected]> wrote:
> >> This is bizarre...I created ftValidateKeywords and making sure it
> >> fails...yet when I save bSuccess=false is not recognized. I have the
> >> same data structure as farUser.cfc when I dump arguments and cfabort.
>
> >> Any clue to why? It's running the ftValidateKeywords because it's
> >> dumping the arguments.
>
> >> Thanks again!
>
> >> On Fri, Aug 13, 2010 at 9:45 AM, Ron Mast <[email protected]> wrote:
> >> > Shawn I'm trying the ftValidateKeywords method. Keywords is the field 
> >> > name.
>
> >> > Looking at the farUser.cfc example. I did a selected resources search
> >> > trying to find how the ftValidateUserID function is getting invoked so
> >> > I can get a better understanding. I didn't find anything.
>
> >> > I created the ftValidateKeywords in mysite/packages/types/course.cfc
>
> >> > I am at loss of how to now use my ftValidateKeywords function.
>
> >> > Thanks!
>
> >> > On Fri, Aug 13, 2010 at 6:37 AM, Sean Coyne <[email protected]> wrote:
> >> >> Ron,
>
> >> >> You can create a ftValidateKeyword method (assuming your field name is
> >> >> "keyword") and FarCry will execute it.
>
> >> >> Check out /core/packages/types/farUser.cfc you can see that they built
> >> >> an ftValidateUserID method to validate the userID.  Your method would
> >> >> use the same areguments, returntype, etc.
>
> >> >> OR
>
> >> >> You can create your own formtool type, say "keywordList".  You would
> >> >> create a keywordlist.cfc in your /project/packages/formtools folder
> >> >> then for your "keyword" field use a ftType="keywordlist".  You can
> >> >> look at any of the other formtool CFCs for examples of how to
> >> >> construct your edit, display, validate and any other methods.
>
> >> >> Sean
>
> >> >> On Aug 12, 4:36 pm, Ron Mast <[email protected]> wrote:
> >> >>> When editing a content type field (Keyword) type longchar. The entry
> >> >>> is comma delimited...but I want to avoid duplicate words making this
> >> >>> example an invalid entry: "farcry, is, awesome, farcry, rules".
> >> >>> Because farcry is used twice I would like to not allow this to save.
>
> >> >>> I wanted to ask the group before I start reading through the
> >> >>> documentation and writing code. Has anyone done this? Perhaps farcry
> >> >>> already can validate this?
>
> >> >>> Thank you for understanding my newbie status! :)
>
> >> >> --
> >> >> 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

-- 
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