On 8/29/05, Brian Kotek <[EMAIL PROTECTED]> wrote: > I would take the form data, put it into a Bean as we've been talking > about in the Bean thread, validate it, and use the data if it passes > validation, but redisplay the form if it fails. Something like this: > > <fuseaction name="processregistration" access="public"> > <invoke object="application.beanFactory" > methodcall="getBean( 'User', attributes )" > returnvariable="userBean"/> > <if condition="#userBean.validate()#"> > <true> > <!-- Was the registration successful? --> > <invoke object="application.userManager" > > methodcall="processRegistration( userBean )"/> > <relocate > url="#myFusebox.originalCircuit#.success"/> > </true> > <false> > <!-- If registration was not successful, > display the registration > form again. --> > <do action="register" /> > </false> > </if> > </fuseaction> > > At some point when I have time (ha!) I'd like to update this app in > several ways, using Beans and the related factory, and possibly > showing AJAX in use (using JSON).
Let's say I want to add form data validation to the Wegot Widgets Fusebox 4.1 OO MVC application, there are four CFCs for the product: Product.cfc ProductManager.cfc ProductDAO.cfc Productgateway.cfc To which CFC should I add the validate() method? If I understand it correctly, the Fusebox controller should only call the ProductManager CFC. Is that right? Thanks a lot. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
