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
}
// Will run validate()
public String execute() {
return SUCCESS:
}
// Will run validateEdit()
public String edit() {
return SUCCESS;
}
// Will run validateUpdate()
public String update() {
return SUCCESS:
}
On Thu, Jun 24, 2010 at 9:53 AM, lucas owen <[email protected]> wrote:
> Hi Struts 2 users,
>
> I have in a class different actions, each one with its own method.
>
> I want a validate() method for each of these actions, I'm not sure if I can
> have more than one validate() method in a class,
> so all the actions would have the same validation.
>
> should i split all my actions in different classes so each one could have
> its own validate() method??
>
> thanks
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]