Blaaaaah.... First off, to JoeO's whole "action as a view" stuff... I have no idea what that's all about, sorry :)
Maurice also treated my original example (as to why action params are needed) not how I intended and somehow the SendEmail action become some wacky view stuff. That's not what I intended at all. So in the example given: > CreateAccount.action=Create > CreateAccount.success=SendConfirmationEmail.action,create_success.jsp That's just plain wacky. It should be: CreateAccount.action=Create CreateAccount.error=create_error.jsp CreateAccount.success=SendConfirmatoionEmail.action SendConfirmationEmail.action=SendEmail SendConfirmationEmail.error=create_error.jsp SendConfirmationEmail.success=create_success.jsp That makes far more sense. And it works today. And it makes sense. One point I want to stress here is that SendConfirmationEmail.action is bound to the SendEmail class. Suppose (back to my original example long lost in the email storm) that we have a generic SendEmail widget. Suppose we want the subject of confirmation mails to be "Confirmation: Account Created". So we could (and this is where the config issue comes in to play) specify the property "subject" to equal that value at deploy-time using the configuration (views.properties, actions.xml). Now you might not see this as very important, but let's look at this example: CreateAccount.action=Create CreateAccount.error=create_error.jsp CreateAccount.success=LoginUser.action LoginUser.action=LoginUser LoginUser.error=login_failed.jsp LoginUser.success=welcome.jsp So this use-case says, "after a user is created, log him in". But now what if your project manager comes to you two weeks later and says, "hey, after the user is created, send out a confirmation email, will ya?". We _could_ just add that code to the Create class. We could write a special SendConfirmationEmail class to put in the middle of the chain. OR, we could not write any code and re-use our generic SendEmail action: CreateAccount.action=Create CreateAccount.error=create_error.jsp CreateAccount.success=SendConfirmationEmail.action SendConfirmationEmail.action=SendEmail SendConfirmationEmail.error=create_error.jsp SendConfirmationEmail.success=LoginUser.action SendConfirmationEmail.params.subject="Your account has been created" LoginUser.action=LoginUser LoginUser.error=login_failed.jsp LoginUser.success=welcome.jsp Requirement completed, no code written. Now stop. OK, I want you all to read this very clearly, because this is the most important part. No, I'm not kidding. OK, here goes: the KEY to this is the idea of aliasing the SAME action in MANY different places. Not only for chaining (though that is a good use) but also for generic action re-use. You can so much more power by being able to specify params as well. -Pat ----- Original Message ----- From: "Maurice Parker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 9:02 AM Subject: Re: [OS-webwork] More thoughts on Configuration > Cool, Billy's still around. :-) > > Philipp Meier wrote: > > >What happens when SendConfirmationEmail.action hits an error condition? > >Assume the email cannot sent because of network misconfiguration. This > >should certainly be reported to the user. (Threre I would suggest > >including the send email logic into CreateAccount). I consider > >SendConfirmation beeing some kind of side-effect of the CreateAccount > >action. > > > > > If by side-effect you mean View, then I agree. > > I don't think Patrick's whole Action-without-a-View thingy has much to > do with MVC and it's probably a stretch say that WW should support this > approach to developement. > > -Maurice > > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork