Example usage for com.google.gwt.aria.client InvalidValue TRUE

List of usage examples for com.google.gwt.aria.client InvalidValue TRUE

Introduction

In this page you can find the example usage for com.google.gwt.aria.client InvalidValue TRUE.

Prototype

InvalidValue TRUE

To view the source code for com.google.gwt.aria.client InvalidValue TRUE.

Click Source Link

Usage

From source file:com.vaadin.client.ui.aria.AriaHelper.java

License:Apache License

/**
 * Handles the required actions depending of the input element contains
 * unaccepted input./* w w  w  . j av a  2 s.c om*/
 * 
 * @param element
 *            Element, typically an input Widget like TextField
 * @param invalid
 *            boolean, true when the element input has an error
 */
public static void handleInputInvalid(Element element, boolean invalid) {
    if (invalid) {
        Roles.getTextboxRole().setAriaInvalidState(element, InvalidValue.TRUE);
    } else {
        Roles.getTextboxRole().removeAriaInvalidState(element);
    }
}