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.