JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > FAQ > How do I populate my action properties upon validation failure
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  How do I populate my action properties upon validation failure
Added by scud, last edited by scud on Mar 30, 2006  (view change)
Labels: 
(None)

Say for example we have a

<ww:checkboxlist
      name="selectedOptions"
      list="options"
      listKey="id"
      listValue="name" />

If we like to populate options upon validation failure, we could have a prepare interceptor above the validation interceptor in the interceptor stack.

....
   public void prepare() throws Exception {
      // populate the options property list with options
      // that are supposed to be checked.
   }
   ....
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