Controller Interface

Controller Interface

From LongJump Support Wiki

Controller Interface
Jump to: navigation, search

You implement the Controller interface to create an instance of a worker class and call its methods to perform operations.

For more, see Working with Pages and Classes and ControllerResponse Class.



This method is called when a user submits a <form> in a page with an action attribute that specifies the URL of a class that implements the Controller interface.

Your implementation of this method does the following:

  • Creates an instance of a worker bean
  • Creates an instance of ControllerResponse
  • Calls the worker bean's methods
  • Sets the return data via ControllerResponse.setData
  • Sets the next page to display via ControllerResponse.setTargetPage


ControllerResponse execute(HashMap params) throws Exception;


The HTML form <input> fields in the page. For each field:
  • The key of params is the name attribute of the <input> tag
  • The value of params is the value attribute of the <input> tag


See ControllerResponse Class.

Personal tools