> >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
> >
> >
> Which is the same as:
>
> CreateAccount.action=Create
> CreateAccount.error=create_error.jsp
> CreateAccount.success=SendConfirmationEmail.action?subject="Your account
has been created"
> SendConfirmationEmail.action=SendEmail
> SendConfirmationEmail.error=create_error.jsp
> SendConfirmationEmail.success=LoginUser.action
> LoginUser.action=LoginUser
> LoginUser.error=login_failed.jsp
> LoginUser.success=welcome.jsp
>
> Which we have been doing for a long time with redirect.action and which
> you will be able to do again once Erik's patch is applied.

I disagree that this is a good way to approach it. First off, the onus
should not be on the success view to control the next action in the chain.
That just isn't intuitive. Or maybe I'm the one here that is ass-backwards
and I just can't see it (you're all backwards, damnit!). :)

But more importantly, this example was simplified for verbosity. But in
reality, stuff like smtp server, message template, from address, cc address,
to address, priority, blah, blah, blah would all be configurable as well. I
don't know what you think is nicer, but I'd go with option #2:

Option #1:
> CreateAccount.action=Create
> CreateAccount.error=create_error.jsp
> CreateAccount.success=SendConfirmationEmail.action?subject="Your account
has been created"&priority=2&messageBody="Your account was been created. You
can now log in to the system at http://foo.com/Login at
anytime"&[EMAIL PROTECTED]&smtpServer=smtp.foo.com
> SendConfirmationEmail.action=SendEmail
> SendConfirmationEmail.error=create_error.jsp
> SendConfirmationEmail.success=LoginUser.action
> LoginUser.action=LoginUser
> LoginUser.error=login_failed.jsp
> LoginUser.success=welcome.jsp

(Which by the way, I believe the parameters would need to be escaped, so it
could look more like subject=Your+account+has+been+created... assuming you
use the redirection action)

Option #2:

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"
SendConfirmationEmail.params.priority=2
SendConfirmationEmail.params.messageBody=blah blah lbha
[EMAIL PROTECTED]
SendConfirmationEmail.params.smtpServer=smtp.foo.com
LoginUser.action=LoginUser
LoginUser.error=login_failed.jsp
LoginUser.success=welcome.jsp

The point is, you treat your result (CreateAccount.success) as just pointing
to SendConfirmationEmail, a unique instance of SendEmail tailored
specifically for the CreateAccount use-case. It is configured that way and
it does exactly that (SendConfirmationEmail).

Is no one seeing it????? AmI really just that strange with WebWork usage? I
say this because this isn't theory to me. This is real world stuff I've been
developing for about 6 months. It's in an application about to go in to
production. And it works very, very, very well.

-Pat




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

Reply via email to