Example usage for com.google.gwt.dom.client TableCellElement setInnerSafeHtml

List of usage examples for com.google.gwt.dom.client TableCellElement setInnerSafeHtml

Introduction

In this page you can find the example usage for com.google.gwt.dom.client TableCellElement setInnerSafeHtml.

Prototype

@Override
    public void setInnerSafeHtml(SafeHtml html) 

Source Link

Usage

From source file:sk.turn.gwtmvp.client.adapters.TableRowAdapter.java

License:Apache License

/**
 * Default implementation that populates the table cells with a return value of {@link #getCellContent(int, Object)}.
 * Override this method if you need to perform more complex operation on a table cell.
 * @param column The column index of the table cell (0-based)
 * @param elem The DOM element of the table cell
 * @param item The item for this row/*w  w w . j  av a  2s .co  m*/
 */
protected void setTableCell(int column, TableCellElement elem, T item) {
    Object content = getCellContent(column, item);
    if (content instanceof SafeHtml) {
        elem.setInnerSafeHtml((SafeHtml) content);
    } else {
        elem.setInnerText(content != null ? content.toString() : "");
    }
}