You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by christopher snow <sn...@coralms.com> on 2007/12/17 14:26:13 UTC

chaining validation rules

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:

@Jpf.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
}

@Jpf.Action(
    // 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.