org.chenillekit.tapestry.core.components
Class Kaptcha
java.lang.Object
org.apache.tapestry5.corelib.base.AbstractField
org.chenillekit.tapestry.core.components.Kaptcha
- All Implemented Interfaces:
- ClientElement, Field
public class Kaptcha
- extends AbstractField
A Captcha is a type of challenge-response test used in computing to ensure that the response is not generated by a computer.
The process usually involves one computer (a server) asking a user to complete a simple test which the computer is able to
generate and grade. Because other computers are unable to solve the CAPTCHA, any user entering a correct solution is presumed
to be human. Thus, it is sometimes described as a reverse Turing test, because it is administered by a machine and targeted to
a human, in contrast to the standard Turing test that is typically administered by a human and targeted to a machine. A common
type of CAPTCHA requires that the user type letters or digits from a distorted image that appears on the screen.
This component based on kaptcha library and produce following HTML code:
<span id="kaptcha1" class="ck-kaptcha">
<img id="kaptcha1_kaptcha" class="ck-kaptcha" src="..."/>
<input id="kaptcha1_input" class="ck-kaptcha" type="text" name="kaptcha1"/>
</span>
so you can change the design by cascading style sheets by the "ck-kaptcha" class.
To use this component, you need the chenillekit-image library in you classpath.
- Version:
- $Id: Kaptcha.java 725 2010-11-03 19:40:03Z homburgs $
| Methods inherited from class org.apache.tapestry5.corelib.base.AbstractField |
createDefaultParameterBinding, decorateInsideField, getClientId, getControlName, getLabel, isDisabled, isRequired, putPropertyNameIntoBeanValidationContext, removePropertyNameFromBeanValidationContext, setDecorator, setFormSupport |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Kaptcha
public Kaptcha()
onKaptchaImage
@OnEvent(value="kaptchaEvent")
public StreamResponse onKaptchaImage(String kaptchaValue)
processSubmission
protected void processSubmission(String elementName)
- Method implemented by subclasses to actually do the work of processing the submission of the form. The element's
elementName property will already have been set. This method is only invoked if the field is not
disabled.
- Specified by:
processSubmission in class AbstractField
- Parameters:
elementName - the name of the element (used to find the correct parameter in the request)
Copyright © 2008-2011 ChenilleKit. All Rights Reserved.