Dashboard > WebWork 1 > WebWork CookBook > Prepared Actions
  WebWork 1 Log In View a printable version of the current page.  
  Prepared Actions
Added by Andre Mermegas, last edited by Hani Suleiman on Apr 25, 2004  (view change)
Labels: 
(None)

If your action implements PrepareAction, before any set methods are called,prepare() will run. In the prepare method you do whatever pre-processing you might have, say get some records from a database.

Consult the API documentation for PrepareAction for more information.

public interface PrepareAction

An Action that needs to prepare its state before receiving parameters should implement this interface. A common use is to get current state from a database, which then is overwritten partially by input parameters. The new state, including the old that was not overwritten, may then be sent back to the database

public void prepare() throws java.lang.Exception

This method is called to allow the action to prepare itself before receiving parameters through its set-methods.All *Aware interfaces are checked before this, so the action can rely on addition information to have been sent through the callbacks (e.g. the application session, or user session)

Throws: 
java.lang.Exception - thrown if a system level exception occurs.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators