How to Create a Preferences Controller

Viewpoint
Teradata Viewpoint is Teradata's strategic and innovative SOV (single operational view) for Teradata DB, Aster, and HDP Hadoop systems management and monitoring that enables Teradata's Unified Data Architecture (UDA).
Teradata Employee

How to Create a Preferences Controller

 Here is the process for implementing a class that renders and processes a page that contains a form:

  1. Create a new java class that extends the com.teradata.portlets.mvc.FormControllerBase class.
  2. Implement the following methods:
  • initCommandObject - Initialize a model object that is used to populate the form fields.
  • renderForm - Collect the data needed to display the form.
  • processForm - Save the form data.
  1. (Optional) Override the default implementation of the following methods:
  •  validate - Validate the user's input to the form.
  •  bind - Bind form parameters to the command object.
  1. Create a bean definition for the controller class in your portlet configuration file.
  2. Map incoming requests to your controller class in your portlet configuration file.
  3. (Optional) If your controller will be responding to servlet requests in addition to portlet requests, then repeat the last two steps for your servlet configuration files.

You must create a new Teradata Viewpoint FormController-based class for each form in your portlet.