Using CFC as Controller for the action of a form works very well with CFMX,
especially for MVC implementation.
You just have to do a redirect to the next view/display layer at the end of
the method (for example with a cflocation).
More info here :
I use CFC's for processing form input (though I always structure my apps
with the MVC design pattern...)
Something like this (this may or may not be useful for you.. but I hope it
is!):
cfcomponent ...
cffunction name=edit output=false ...
cfargument ...
!--- update
Ok, just to see if I'm getting this down. What is being done here is that
the Form Action Method is modifying global to the application variables, a
'model' object in your example I believe. And then uses cflocation... to
return form the action method.
Is that an over simplification? Am I
Is that an over simplification? Am I missing anything fundamental?
It's a simplification.. yes. The model is a single database entry entry,
so to speak. What I was hinting at with my example was an address book..
The model is a cfc containing methods for manipulating a single person in
the
4 matches
Mail list logo