beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christopher snow <>
Subject chaining validation rules
Date Mon, 17 Dec 2007 13:26:13 GMT
I have several controller actions that have similar rules.  Is is 
possible to extract the common rules to a common action and then 
conditionally forward to the other actions?  I would like all validation 
errors to be combined and handled by the specific action:

        // common validation rules
public commonAction(MyForm form) {
    // this method doesn't do anything except
    // shared validation
    // if X, forward to actionX
    // if Y, forward to action Y

    // X validation rules
    validationErrorForward = // Can commonAction validation errors be 
combined with actionX validation errors?
public actionX(MyForm form) {
   // do stuff

Thanks in advance....

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

View raw message