Class BaseDynaForm
java.lang.Object
org.apache.struts.action.ActionForm
org.apache.struts.action.DynaActionForm
com.softslate.commerce.customer.core.BaseDynaForm
- All Implemented Interfaces:
Serializable,org.apache.commons.beanutils.DynaBean
- Direct Known Subclasses:
BasicInstallerForm,CategoryForm,ManufacturerForm,PayflowProTransAuthForm,ProductForm,ProductListForm,SearchForm,SecuritySettingsForm,SettingsForm,SettingsFormAuthorizeNet,SettingsFormAuthorizeNetCIM,SettingsFormAuthorizeNetDPM,SettingsFormAvaTax,SettingsFormFedEx,SettingsFormFirstData,SettingsFormGeneralDisplay,SettingsFormGoogleCheckout,SettingsFormPayflowLink,SettingsFormPayflowPro,SettingsFormPayment,SettingsFormPayPal,SettingsFormPayPalUK,SettingsFormPaypoint,SettingsFormPurchaseOrder,SettingsFormShipping,SettingsFormTax,SettingsFormThemes,SettingsFormUPS,SettingsFormUSPS,StoreSettingsForm,UpgradesForm
public class BaseDynaForm
extends org.apache.struts.action.DynaActionForm
Extends the Struts
DynaActionForm class to provide base
functionality for form classes in the system. Provides several properties
common to most of the Web requests the application receives, to help action
classes communicate with the rest of the application.
Within the action classes of the Struts layer, this BaseDynaForm
will be passed from method to method so that each of these properties can be
accessed easily.
- Author:
- David Tobey
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BusinessObjectFactoryThe application's business object factory.private org.apache.struts.action.ActionErrorsAnActionErrorsobject that stores any errors that will be displayed to the current user within the response.private FormUtils(package private) static org.apache.commons.logging.Logprivate org.apache.struts.action.ActionMappingThe mapping corresponding to the current action of the request.private org.apache.struts.action.ActionMessagesAnActionMessagesobject that can be used to store messages that will be displayed to the user within the response.private javax.servlet.http.HttpServletRequestThe currentHttpServletRequestobject pertaining to the submission to thisBaseForm.private static final longprivate SettingsThis request's settings, as loaded from thesscSettingdatabase table.private UserThe current user making the request for thisBaseForm.Fields inherited from class org.apache.struts.action.DynaActionForm
dynaClass, dynaValuesFields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionErrorsorg.apache.struts.action.ActionMappinggetMessage(String module, String key, Object[] args) Look up and return a message from a given bundle in the StrutsMessageResourcesobjects in the application scope.org.apache.struts.action.ActionMessagesjavax.servlet.http.HttpServletRequestgetUser()voidinitializeProperties(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) Initializes all the properties of thisBaseFormby copying the objects from the request, session, and application scopes.voidsetBusinessObjectFactory(BusinessObjectFactory businessObjectFactory) voidsetErrors(org.apache.struts.action.ActionErrors errors) voidsetMapping(org.apache.struts.action.ActionMapping mapping) voidsetMessages(org.apache.struts.action.ActionMessages messages) voidsetRequest(javax.servlet.http.HttpServletRequest request) voidsetSettings(Settings settings) voidMethods inherited from class org.apache.struts.action.DynaActionForm
contains, get, get, get, getDynaClass, getDynaProperty, getMap, getString, getStrings, initialize, initialize, isDynaAssignable, remove, reset, reset, set, set, set, toStringMethods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate, validate
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
static org.apache.commons.logging.Log log -
request
private javax.servlet.http.HttpServletRequest requestThe currentHttpServletRequestobject pertaining to the submission to thisBaseForm. -
messages
private org.apache.struts.action.ActionMessages messagesAnActionMessagesobject that can be used to store messages that will be displayed to the user within the response. -
errors
private org.apache.struts.action.ActionErrors errorsAnActionErrorsobject that stores any errors that will be displayed to the current user within the response. -
mapping
private org.apache.struts.action.ActionMapping mappingThe mapping corresponding to the current action of the request. -
settings
This request's settings, as loaded from thesscSettingdatabase table. -
user
The current user making the request for thisBaseForm. This object lives in the user's session across requests, but can be passed throughout the Struts layer through this property. -
businessObjectFactory
The application's business object factory. Available here so that any of the Struts actions processing the request can use it to easily instantiate business objects. -
formUtils
-
-
Constructor Details
-
BaseDynaForm
public BaseDynaForm()
-
-
Method Details
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest() -
setRequest
public void setRequest(javax.servlet.http.HttpServletRequest request) -
getMessages
public org.apache.struts.action.ActionMessages getMessages() -
setMessages
public void setMessages(org.apache.struts.action.ActionMessages messages) -
getErrors
public org.apache.struts.action.ActionErrors getErrors() -
setErrors
public void setErrors(org.apache.struts.action.ActionErrors errors) -
getMapping
public org.apache.struts.action.ActionMapping getMapping() -
setMapping
public void setMapping(org.apache.struts.action.ActionMapping mapping) -
getSettings
-
setSettings
-
getUser
-
setUser
-
getBusinessObjectFactory
-
setBusinessObjectFactory
-
initializeProperties
public void initializeProperties(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) Initializes all the properties of thisBaseFormby copying the objects from the request, session, and application scopes. Called by action classes and within thevalidatemethod of thisBaseForm.- Parameters:
mapping- The mapping corresponding to the current action of the request.request- TheHttpServletRequestobject for this request.
-
getMessage
Look up and return a message from a given bundle in the StrutsMessageResourcesobjects in the application scope.- Parameters:
module- Name of the servlet context attribute for the message resources bundle.key- Message key to be looked up and returned.args- Replacement parameters for this message.- Returns:
- message The message, or
nullif the message can't be found.
-
getFormUtils
-
html5OrXhtml
-