JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > FAQ > How can I integrate WebWork IoC in to an object that is not an action
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  How can I integrate WebWork IoC in to an object that is not an action
Added by scud, last edited by scud on Mar 30, 2006  (view change)
Labels: 
(None)

Obtain the ComponentManager from the request: ComponentManager cm = (ComponentManager) ServletActionContext.getRequest().getAttribute("DefaultComponentManager");
then you need to initialize it using: cm.initializeObject(Object)

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