Example usage for com.google.gwt.uibinder.elementparsers HtmlInterpreter newInterpreterForUiObject

List of usage examples for com.google.gwt.uibinder.elementparsers HtmlInterpreter newInterpreterForUiObject

Introduction

In this page you can find the example usage for com.google.gwt.uibinder.elementparsers HtmlInterpreter newInterpreterForUiObject.

Prototype

public static HtmlInterpreter newInterpreterForUiObject(UiBinderWriter writer, String uiExpression) 

Source Link

Document

A convenience factory method for the most common use of this class, to work with HTML that will eventually be rendered under a com.google.gwt.user.client.ui.UIObject (or really, any object that responds to getElement()).

Usage

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

License:Apache License

@Override
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer)
        throws UnableToCompleteException {

    HtmlInterpreter interpreter = HtmlInterpreter.newInterpreterForUiObject(writer, fieldName);

    String html = elem.consumeInnerHtml(interpreter);

    if (html.trim().length() > 0) {
        writer.genStringPropertySet(fieldName, "Html", html);
    }/*from www.ja v a  2  s  .c om*/
}