Example usage for com.google.gwt.uibinder.rebind XMLElement consumeBooleanAttribute

List of usage examples for com.google.gwt.uibinder.rebind XMLElement consumeBooleanAttribute

Introduction

In this page you can find the example usage for com.google.gwt.uibinder.rebind XMLElement consumeBooleanAttribute.

Prototype

public String consumeBooleanAttribute(String name, boolean defaultValue) throws UnableToCompleteException 

Source Link

Document

Convenience method for parsing the named attribute as a boolean value or reference.

Usage

From source file:com.jhickman.web.gwt.gxtuibinder.elementparsers.menu.CheckMenuItemParser.java

License:Apache License

public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer)
        throws UnableToCompleteException {
    String checkedValue = elem.consumeBooleanAttribute("checked", false);
    writer.addStatement("%s.setChecked(%s);", fieldName, checkedValue);
}