org.jaffa.components.maint
Class MaintForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended byorg.jaffa.presentation.portlet.FormBase
          extended byorg.jaffa.components.maint.MaintForm
All Implemented Interfaces:
Serializable

public class MaintForm
extends FormBase

This is the base class for all Maintenance Component FormBeans.

Author:
GautamJ
See Also:
Serialized Form

Field Summary
static String PARAMETER_CURRENT_SCREEN_COUNTER
          Constant for the parameter currentScreenCounter.
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
MaintForm()
           
 
Method Summary
 boolean doValidate(HttpServletRequest request)
          This method should be invoked to ensure a valid state of the FormBean.
 int getCurrentScreenCounter()
          Getter for property currentScreenCounter.
 boolean isClearActionAvailable()
          Returns true if Clear is allowed in the current screen.
 boolean isDeleteActionAvailable()
          Returns true if Delete is allowed in the current screen.
 boolean isDisplayOnlyField(String fieldName)
          Returns a true if a field has been marked as 'DisplayOnly'.
 boolean isNextActionAvailable()
          Returns true if there is a Next screen after the current screen.
 boolean isPreviousActionAvailable()
          Returns true if there is a Previous screen before the current screen.
 boolean isRefreshActionAvailable()
          Returns true if Refresh is allowed in the current screen.
 boolean isSaveActionAvailable()
          Returns true if Save is allowed in the current screen.
 boolean isUpdateMode()
          Is this update mode, if so the key is display only, else this is create mode and the key is editable.
 void setCurrentScreenCounter(int currentScreenCounter)
          Setter for property currentScreenCounter.
 
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

PARAMETER_CURRENT_SCREEN_COUNTER

public static final String PARAMETER_CURRENT_SCREEN_COUNTER
Constant for the parameter currentScreenCounter.

See Also:
Constant Field Values
Constructor Detail

MaintForm

public MaintForm()
Method Detail

isUpdateMode

public boolean isUpdateMode()
Is this update mode, if so the key is display only, else this is create mode and the key is editable.

Returns:
true if record is being updated, false if created.

getCurrentScreenCounter

public int getCurrentScreenCounter()
Getter for property currentScreenCounter.

Returns:
Value of property currentScreenCounter.

setCurrentScreenCounter

public void setCurrentScreenCounter(int currentScreenCounter)
Setter for property currentScreenCounter.

Parameters:
currentScreenCounter - New value of property currentScreenCounter.

isDisplayOnlyField

public boolean isDisplayOnlyField(String fieldName)
Returns a true if a field has been marked as 'DisplayOnly'.

Parameters:
fieldName - The field to be checked.
Returns:
a true if a field has been marked as 'DisplayOnly'

isClearActionAvailable

public boolean isClearActionAvailable()
Returns true if Clear is allowed in the current screen.

Returns:
true if Clear is allowed in the current screen.

isSaveActionAvailable

public boolean isSaveActionAvailable()
Returns true if Save is allowed in the current screen.

Returns:
true if Save is allowed in the current screen.

isDeleteActionAvailable

public boolean isDeleteActionAvailable()
Returns true if Delete is allowed in the current screen.

Returns:
true if Delete is allowed in the current screen.

isRefreshActionAvailable

public boolean isRefreshActionAvailable()
Returns true if Refresh is allowed in the current screen.

Returns:
true if Refresh is allowed in the current screen.

isNextActionAvailable

public boolean isNextActionAvailable()
Returns true if there is a Next screen after the current screen.

Returns:
true if there is a Next screen after the current screen.

isPreviousActionAvailable

public boolean isPreviousActionAvailable()
Returns true if there is a Previous screen before the current screen.

Returns:
true if there is a Previous screen before the current screen.

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.


Copyright © 2002-2004 JAFFA Project.