org.jaffa.components.finder
Class FinderForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended byorg.jaffa.presentation.portlet.FormBase
          extended byorg.jaffa.components.finder.FinderForm
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LookupForm

public abstract class FinderForm
extends FormBase

This is the base class for all FinderComponent FormBeans. It has the following properties to support the Criteria Screen - 1- sortDropDown : The sort criteria to use for the inquiry 2- exportType : The export option to use for the inquiry (initialized to regular Web Pages) 3- maxRecords: The maximum number of records to retrieve. This will be initialized to the first value in the option list. It has the following properties to support the Results Screen - 1- rows : This GridModel object will be used for displaying the data in the Results screen 2- moreRecordsExist : This indicates if more records will be retrieved, if the query is done by using a higher value for the maxRecords dropdown. A Finder FormBean will have to provide an implementation for the populateRows() method.

Author:
GautamJ
See Also:
Serialized Form

Field Summary
static String EXPORT_TYPE
          A global constant for the exportType widget.
static String MAX_RECORDS
          A global constant for the maxRecords widget.
static String ROWS
          A global constant for the rows widget.
static String SORT_DROP_DOWN
          A global constant for the sortDropDown widget.
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
FinderForm()
           
 
Method Summary
 boolean doValidate(HttpServletRequest request)
          This method should be invoked to ensure a valid state of the FormBean.
 String getExportType()
          Getter for property exportType.
 RadioButtonModel getExportTypeWM()
          Getter for property exportType.
 Integer getMaxRecords()
          Getter for property maxRecords.
 DropDownModel getMaxRecordsWM()
          Getter for DropDown property maxRecords.
 boolean getMoreRecordsExist()
          Getter for property moreRecordsExist.
 Long getNumberOfRecords()
          Getter for property numberOfRecords.
 GridModel getRowsWM()
          Getter for property rows.
 String getSortDropDown()
          Getter for property sortDropDown.
 DropDownModel getSortDropDownWM()
          Getter for DropDown property sortDropDown.
abstract  void populateRows(GridModel rows)
          The FormBean should provide an implementation for this method.
 void setExportType(String exportType)
          Setter for property exportType.
 void setExportTypeWV(String value)
          Setter for property exportType.
 void setMaxRecords(Integer maxRecords)
          Setter for property maxRecords.
 void setMaxRecordsWV(String value)
          Setter for DropDown property maxRecords.
 void setRowsWV(String value)
          Setter for property rows.
 void setSortDropDown(String sortDropDown)
          Setter for property sortDropDown.
 void setSortDropDownWV(String value)
          Setter for DropDown property sortDropDown.
 
Methods inherited from class org.jaffa.presentation.portlet.FormBase
cleanup, clearErrors, getComponent, getErrors, getWidgetCache, hasErrors, initForm, raiseError, raiseError, raiseError, raiseError, raiseError, raiseError, raiseError, raiseError, raiseError, reset, setComponent
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_DROP_DOWN

public static final String SORT_DROP_DOWN
A global constant for the sortDropDown widget.

See Also:
Constant Field Values

EXPORT_TYPE

public static final String EXPORT_TYPE
A global constant for the exportType widget.

See Also:
Constant Field Values

MAX_RECORDS

public static final String MAX_RECORDS
A global constant for the maxRecords widget.

See Also:
Constant Field Values

ROWS

public static final String ROWS
A global constant for the rows widget.

See Also:
Constant Field Values
Constructor Detail

FinderForm

public FinderForm()
Method Detail

getSortDropDown

public String getSortDropDown()
Getter for property sortDropDown.

Returns:
Value of property sortDropDown.

setSortDropDown

public void setSortDropDown(String sortDropDown)
Setter for property sortDropDown.

Parameters:
sortDropDown - New value of property sortDropDown.

getSortDropDownWM

public DropDownModel getSortDropDownWM()
Getter for DropDown property sortDropDown.

Returns:
Value of DropDown property sortDropDown.

setSortDropDownWV

public void setSortDropDownWV(String value)
Setter for DropDown property sortDropDown. This is invoked by the servlet, when a post is done on the Criteria screen.

Parameters:
value - New value of DropDown property sortDropDown.

getExportType

public String getExportType()
Getter for property exportType.

Returns:
Value of property exportType.

setExportType

public void setExportType(String exportType)
Setter for property exportType.

Parameters:
exportType - New value of property exportType.

getExportTypeWM

public RadioButtonModel getExportTypeWM()
Getter for property exportType.

Returns:
Value of property exportType.

setExportTypeWV

public void setExportTypeWV(String value)
Setter for property exportType. This is invoked by the servlet, when a post is done on the Criteria screen.

Parameters:
value - New value of property exportType.

getMaxRecords

public Integer getMaxRecords()
Getter for property maxRecords.

Returns:
Value of property maxRecords.

setMaxRecords

public void setMaxRecords(Integer maxRecords)
Setter for property maxRecords.

Parameters:
maxRecords - New value of property maxRecords.

getMaxRecordsWM

public DropDownModel getMaxRecordsWM()
Getter for DropDown property maxRecords.

Returns:
Value of DropDown property maxRecords.

setMaxRecordsWV

public void setMaxRecordsWV(String value)
Setter for DropDown property maxRecords. This is invoked by the servlet, when a post is done on the Criteria screen.

Parameters:
value - New value of DropDown property maxRecords.

doValidate

public boolean doValidate(HttpServletRequest request)
This method should be invoked to ensure a valid state of the FormBean. It will validate the data in the models and set the corresponding properties. Errors will be raised in the FormBean, if any validation fails.

Parameters:
request - The request stream
Returns:
A true indicates validations went through successfully.

getRowsWM

public GridModel getRowsWM()
Getter for property rows. This is invoked by the custom tag, when the jsp is rendered, to get the current value. This gets the current data from the component.

Returns:
Value of property userRef1.

setRowsWV

public void setRowsWV(String value)
Setter for property rows. This is invoked by the servlet, when a post is done on the Results screen. It sets the selected rows on the model.

Parameters:
value - New value of property userRef1.

getMoreRecordsExist

public boolean getMoreRecordsExist()
Getter for property moreRecordsExist.

Returns:
Value of property moreRecordsExist.

getNumberOfRecords

public Long getNumberOfRecords()
Getter for property numberOfRecords.

Returns:
Value of property numberOfRecords.

populateRows

public abstract void populateRows(GridModel rows)
The FormBean should provide an implementation for this method. This will populate the input GridModel with the data in the finderOutDto of the Component.

Parameters:
rows - The GridModel object to populate.


Copyright © 2002-2004 JAFFA Project.