JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > J2SE 5 Support > BeforeResult Annotation
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  BeforeResult Annotation
Added by scud, last edited by scud on May 17, 2006  (view change)
Labels: 
(None)

BeforeResult 标注(Annotation)

标注一个action方法,在result之前需要被执行.返回值被忽略.

使用

BeforeResult 标注可以在方法级别上设置.

参数

没有参数

例子

public class SampleAction extends ActionSupport {

 @BeforeResult
 public void isValid() throws ValidationException {
   // validate model object, throw exception if failed
 }

 public String execute() {
    // perform action
    return SUCCESS;
 }
}
Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators