[thelist] My dear CFASSOCIATEs

Chris Evans chris at fuseware.com
Wed Jul 25 21:17:33 CDT 2001


Per .jeff, I don't think you need CFASSOCIATE.  I normally return a
structure named the same as the custom tag, with various fields that are
needed. For example, if I have a custom tag called validate.cfm, I would add
this to the end of the tag:

<CFSET Validate=StructNew()>
<CFSET Validate.Error="Invalid Fields">
<CFSET Validate.BadFields="Name, address">
<CFSET Caller.validate=Validate>

Now, in the caller tag, validate.Error will give you the error "Invalid
Fields", and so forth.

We're writing a spec for this way of dealing with customn tags.  We've been
using it as a coding standard internally, and it seems to work well.


Chris Evans
chris at fuseware.com
http://www.fuseware.com








More information about the thelist mailing list