|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.frontend.templateone.form.A_CmsField
org.opencms.frontend.templateone.form.CmsCaptchaField
public class CmsCaptchaField
Creates captcha images and validates the pharses submitted by a request parameter.
| Field Summary | |
|---|---|
static java.lang.String |
C_PARAM_CAPTCHA_PHRASE
Request parameter name of the captcha phrase. |
| Constructor Summary | |
|---|---|
CmsCaptchaField(CmsCaptchaSettings captchaSettings,
java.lang.String fieldLabel,
java.lang.String fieldValue)
Creates a new captcha field. |
|
| Method Summary | |
|---|---|
java.lang.String |
buildHtml(CmsFormHandler formHandler,
org.opencms.i18n.CmsMessages messages,
java.lang.String errorKey)
Builds the HTML input element for this element to be used in a frontend JSP. |
CmsCaptchaSettings |
getCaptchaSettings()
Returns the captcha settings of this field. |
static java.lang.String |
getStaticType()
Returns the type of the input field, e.g. |
java.lang.String |
getType()
Returns the type of the input field, e.g. |
boolean |
validateCaptchaPhrase(org.opencms.jsp.CmsJspActionElement jsp,
java.lang.String captchaPhrase)
Validates the captcha phrase entered by the user. |
void |
writeCaptchaImage(org.opencms.jsp.CmsJspActionElement cms)
Writes a Captcha JPEG image to the servlet response output stream. |
| Methods inherited from class org.opencms.frontend.templateone.form.A_CmsField |
|---|
getErrorMessage, getItems, getLabel, getName, getPlaceholder, getPosition, getValidationExpression, getValue, incrementPlaceholder, isMandatory, needsItems, setErrorMessage, setItems, setLabel, setMandatory, setName, setPlaceholder, setPosition, setValidationExpression, setValue, showRowEnd, showRowStart, toString, validate, validateConstraints, validateValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String C_PARAM_CAPTCHA_PHRASE
| Constructor Detail |
|---|
public CmsCaptchaField(CmsCaptchaSettings captchaSettings,
java.lang.String fieldLabel,
java.lang.String fieldValue)
captchaSettings - the settings to render captcha imagesfieldLabel - the localized label of this fieldfieldValue - the submitted value of this field| Method Detail |
|---|
public static java.lang.String getStaticType()
public java.lang.String buildHtml(CmsFormHandler formHandler,
org.opencms.i18n.CmsMessages messages,
java.lang.String errorKey)
I_CmsField
formHandler - the handler of the current formmessages - a resource bundle containing HTML snippets to build the HTML elementerrorKey - the key of the current error message
I_CmsField.buildHtml(CmsFormHandler,
org.opencms.i18n.CmsMessages, String)public CmsCaptchaSettings getCaptchaSettings()
public java.lang.String getType()
I_CmsField
I_CmsField.getType()
public boolean validateCaptchaPhrase(org.opencms.jsp.CmsJspActionElement jsp,
java.lang.String captchaPhrase)
jsp - the Cms JSPcaptchaPhrase - the captcha phrase to be validate
public void writeCaptchaImage(org.opencms.jsp.CmsJspActionElement cms)
throws java.io.IOException
cms - an initialized Cms JSP action element
java.io.IOException - if something goes wrong
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||