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

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

Introduction

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

Prototype

public String consumeInnerTextEscapedAsHtmlStringLiteral(Interpreter<String> interpreter)
        throws UnableToCompleteException 

Source Link

Document

Consumes all child text nodes, and asserts that this element held only text.

Usage

From source file:com.jhickman.web.gwt.gxtuibinder.elementparsers.form.SimpleComboBoxParser.java

License:Apache License

private String parseChildElement(XMLElement elem, JClassType valueType, UiBinderWriter writer)
        throws UnableToCompleteException {
    if ("value".equals(elem.getLocalName())) {
        return String.format("\"%s\"",
                elem.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(writer)));
    } else if ("item".equals(elem.getLocalName())) {
        return elem.consumeRequiredAttribute("value", valueType);
    }//from w w w.j av a2  s .c o m

    writer.die(elem, "Unknown child element of SimpleComboBox");

    return null; // will never get here
}