Directory

← Back

jcaptchafield

jCaptcha Field

Author

Rating

Popularity

<100

Simple form field implementation to add a captchafield to a form.

This module is build on the jcaptcha package. For the extended documentation go to: http://jcaptcha.sourceforge.net/apidocs/1.0/ http://jcaptcha.octo.com/confluence/display/general/Home

You will also need the jcaptcha-1.0-all.jar: http://sourceforge.net/projects/jcaptcha/files/jcaptcha/jcaptcha-1.0/jcaptcha-1.0-bin.zip/download

Note: The first time the application starts, this component needs to connect to a webservice. This can take a couple of seconds, but its only needed once.

You can only use this field only once per screen. You can not use it multiple times on the same screen.

Sample code

public class VaadintestApplication extends Application {
	@Override
	public void init() {
		final Window mainWindow = new Window("Vaadintest Application");
		Form form = new Form();
		final CaptchaField captchaField = new CaptchaField(this);
		form.addField("Captcha", captchaField);
		final TextField text = new TextField();
		form.addField("Captcha input", text);
		
		Button button = new Button();
		button.addListener(new Button.ClickListener() {
			@Override
			public void buttonClick(ClickEvent event) {
				captchaField.validateCaptcha((String)text.getValue());
			}
		});
		form.getFooter().addComponent(button);
		mainWindow.addComponent(form);
		setMainWindow(mainWindow);
	}

}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • Layout change, reload button under captcha field
  • Small code refactoring
Released
2010-08-07
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.0+
Browser
N/A

jcaptchafield - Vaadin Add-on Directory

jCaptcha Field jcaptchafield - Vaadin Add-on Directory
Simple form field implementation to add a captchafield to a form. This module is build on the jcaptcha package. For the extended documentation go to: http://jcaptcha.sourceforge.net/apidocs/1.0/ http://jcaptcha.octo.com/confluence/display/general/Home You will also need the jcaptcha-1.0-all.jar: http://sourceforge.net/projects/jcaptcha/files/jcaptcha/jcaptcha-1.0/jcaptcha-1.0-bin.zip/download Note: The first time the application starts, this component needs to connect to a webservice. This can take a couple of seconds, but its only needed once. You can only use this field only once per screen. You can not use it multiple times on the same screen.
Online