org.apache.empire.struts2.actionsupport
Class RecordFormActionSupport

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.struts2.actionsupport.FormActionSupport
          extended by org.apache.empire.struts2.actionsupport.RecordFormActionSupport
All Implemented Interfaces:
org.apache.empire.commons.ErrorInfo
Direct Known Subclasses:
BeanActionSupport, RecordActionSupport

public abstract class RecordFormActionSupport
extends FormActionSupport


Method Summary
 java.lang.Object[] getActionParamKey()
          Returns the record key.
 boolean getActionParamNewFlag()
          Returns a flag whether or not the current record is a new record.
 SessionPersistence getPersistence()
           
abstract  org.apache.empire.data.Record getRecord()
           
 java.lang.String getRecordKeyString()
           
 java.lang.String getRequestFieldName(org.apache.empire.data.Column column)
          returns the name of a field as used in the form
 boolean hasActionKey(boolean acceptSessionKey)
          Checks wether or not the record key is supplied
 boolean isNewRecord()
           
 boolean loadFormData()
          loads the data from the form into the current record object
 
Methods inherited from class org.apache.empire.struts2.actionsupport.FormActionSupport
getRecordPropertyName, isEnableFieldErrors, setEnableFieldErrors
 
Methods inherited from class org.apache.empire.commons.ErrorObject
clearError, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, isExceptionsEnabled, setExceptionsEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPersistence

public SessionPersistence getPersistence()

getRecord

public abstract org.apache.empire.data.Record getRecord()

getRecordKeyString

public java.lang.String getRecordKeyString()

isNewRecord

public boolean isNewRecord()

getRequestFieldName

public java.lang.String getRequestFieldName(org.apache.empire.data.Column column)
returns the name of a field as used in the form

Parameters:
column -
Returns:
the form name of the record field

hasActionKey

public boolean hasActionKey(boolean acceptSessionKey)
Checks wether or not the record key is supplied

Parameters:
acceptSessionKey - true if a key supplied on the session is acceptable or false otherwise
Returns:
true if the record has a bean associated with it or false otherwiese

getActionParamKey

public java.lang.Object[] getActionParamKey()
Returns the record key. The key may be supplied with the request or with the session.

Returns:
the record key

getActionParamNewFlag

public boolean getActionParamNewFlag()
Returns a flag whether or not the current record is a new record.

Returns:
true if the record is a new unsaved record.

loadFormData

public boolean loadFormData()
loads the data from the form into the current record object

Specified by:
loadFormData in class FormActionSupport
Returns:
true if all fields supplied with the request have been successfully set on the record