public class BeanActionSupport<T> extends RecordFormActionSupport
This class provides functions for form data processing through ordinary JavaBean or Data Transfer Objects (DTO).
Metadata for the Beans should be provided using the BeanClass and BeanProperty classes.
It is recommended (but not necessary) to create a subclass of the BeanRecordProxy<T> class in order to provide
further context specific metadata.
persistence
action, log, propertyName
Constructor and Description |
---|
BeanActionSupport(ActionBase action,
BeanClass beanClass,
SessionPersistence persistence) |
BeanActionSupport(ActionBase action,
BeanClass beanClass,
SessionPersistence persistence,
String propertyName) |
BeanActionSupport(ActionBase action,
BeanRecordProxy<T> record,
SessionPersistence persistence) |
BeanActionSupport(ActionBase action,
BeanRecordProxy<T> record,
SessionPersistence persistence,
String propertyName) |
BeanActionSupport(ActionBase action,
List<Column> updateColumns,
Column[] keyColumns,
SessionPersistence persistence) |
BeanActionSupport(ActionBase action,
List<Column> updateColumns,
Column[] keyColumns,
SessionPersistence persistence,
String propertyName) |
BeanActionSupport(ActionBase action,
List<Column> updateColumns,
Column keyColumn,
SessionPersistence persistence) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkKey()
Checks wether the key supplied with the request is identical to the key of the current record.
|
T |
getData()
Gets the bean data.
|
Record |
getRecord()
returns the Record interface implementation for the bean
|
Object[] |
getRecordKeyValues()
Returns the current key values of the bean attached to the record proxy.
|
void |
initKeyColumns()
Initializes the key columns of the current record from the action parameters.
|
boolean |
isValid()
Checks wether or not the record has a bean object attached
|
void |
setData(T data)
Sets the bean data.
|
void |
updateSessionKey()
Refreshes the record key stored on the session.
|
compareKey, getActionParamKey, getActionParamNewFlag, getPersistence, getRecordFromSession, getRecordKeyString, getRequestFieldName, hasActionKey, isNewRecord, loadFormData, persistOnSession, removeFromSession, setRecordFieldValue, setUpdateFields
addFieldError, getActionParam, getRecordPropertyName, isEnableFieldErrors, setEnableFieldErrors
public BeanActionSupport(ActionBase action, BeanRecordProxy<T> record, SessionPersistence persistence, String propertyName)
public BeanActionSupport(ActionBase action, BeanRecordProxy<T> record, SessionPersistence persistence)
public BeanActionSupport(ActionBase action, BeanClass beanClass, SessionPersistence persistence, String propertyName)
public BeanActionSupport(ActionBase action, BeanClass beanClass, SessionPersistence persistence)
public BeanActionSupport(ActionBase action, List<Column> updateColumns, Column[] keyColumns, SessionPersistence persistence, String propertyName)
public BeanActionSupport(ActionBase action, List<Column> updateColumns, Column[] keyColumns, SessionPersistence persistence)
public BeanActionSupport(ActionBase action, List<Column> updateColumns, Column keyColumn, SessionPersistence persistence)
public Record getRecord()
getRecord
in class RecordFormActionSupport
public boolean isValid()
public T getData()
public void setData(T data)
data
- the bean data objectpublic Object[] getRecordKeyValues()
public boolean checkKey()
public void updateSessionKey()
public void initKeyColumns()
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.