Burton, that was what i was looking for
YOU #1
THANKS!!!
2010/6/24 David Lu
>
> I think having separate classes would be better.
>
> If the validations are almost the same, i.e. one
> for "Add" and one for "Update" of the same object,
> then perhaps you can have just one action extend
> anothe
I think having separate classes would be better.
If the validations are almost the same, i.e. one
for "Add" and one for "Update" of the same object,
then perhaps you can have just one action extend
another and they can share some common validation
code in a method defined in the base action.
O
Depending on which method you call in your class you can just append
that method name to the validate() method name. For example:
public void validateEdit() {
// Validate Stuff here
}
public void validateUpdate() {
// Validate Stuff here
}
public void validate() {
// Validate Stuff here
3 matches
Mail list logo