Jason Carreira wrote:
Hmm... I'm not sure on this one... I see where you're coming from, but I'm hesitant to add more complexity...
It definitely can't go in before 2.0 final.
I guess I would say that if you have different action methods in one
class that need different validations in validate() that maybe they
should be separate Action classes.
-----Original Message-----
From: Francisco Hernandez [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 12:44 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] specifying what validation method to use for actions
what do you guys think of adding somekind of way to specify what the validation method to use in the validation interceptor?
right now it just uses validate() and is called on every action, but sometimes not all actions use that same validate method, so what i'd like to do is convert a action method like so:
public String create() { // check for errors and add them in they exist
if (!hasErrors()) { baseService.save(user); } else { return INPUT; } return SUCCESS; } to: public void validateCreate() { // check for errors and add them in they exist }
public String create() { baseService.save(user); return SUCCESS; }
benefit is that i dont need to check for errors in my methods, the validation interceptor will just send me back to INPUT if errors are in the action.
any input?
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork