com.softslate.commerce.customer.core
Class Form2EmailForm
java.lang.Object
org.apache.struts.action.ActionForm
com.softslate.commerce.customer.core.BaseForm
com.softslate.commerce.customer.core.Form2EmailForm
- All Implemented Interfaces:
- java.io.Serializable
public class Form2EmailForm
- extends BaseForm
Struts form class for submissions to the contact form and other form-to-email
forms.
The validate method of this class checks to make sure a "formType" parameter
is present. The form type is used to look up which fields are validated, and
required. They are looked up in the application settings by finding settings
whose codes match 'requiredFields<formType>' and
'validatedFields<formType>'.
If the "useImageVerificationWithContactForms" setting is set, it checks the
entered text against the Jcaptcha image that was presented.
- Author:
- David Tobey
- See Also:
- Serialized Form
Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
Method Summary |
java.lang.String |
constructEmailHTML(javax.servlet.http.HttpServletRequest request)
|
java.lang.String |
constructEmailText(javax.servlet.http.HttpServletRequest request)
|
java.lang.String |
getFormType()
|
java.lang.String |
getTextFromImage()
|
boolean |
isFieldValid(java.lang.String field,
java.lang.String value)
|
void |
setFormType(java.lang.String formType)
|
void |
setTextFromImage(java.lang.String textFromImage)
|
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
|
Methods inherited from class com.softslate.commerce.customer.core.BaseForm |
formUtils, getBusinessObjectFactory, getErrors, getMapping, getMessage, getMessages, getRequest, getSettings, getUser, initializeProperties, setBusinessObjectFactory, setErrors, setMapping, setMessages, setRequest, setSettings, setUser |
Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
log
static org.apache.commons.logging.Log log
formType
private java.lang.String formType
textFromImage
private java.lang.String textFromImage
Form2EmailForm
public Form2EmailForm()
getFormType
public java.lang.String getFormType()
setFormType
public void setFormType(java.lang.String formType)
getTextFromImage
public java.lang.String getTextFromImage()
setTextFromImage
public void setTextFromImage(java.lang.String textFromImage)
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Overrides:
validate
in class org.apache.struts.action.ActionForm
isFieldValid
public boolean isFieldValid(java.lang.String field,
java.lang.String value)
constructEmailText
public java.lang.String constructEmailText(javax.servlet.http.HttpServletRequest request)
constructEmailHTML
public java.lang.String constructEmailHTML(javax.servlet.http.HttpServletRequest request)
Copyright © SoftSlate, LLC 20032005