Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See <a href="http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/AbstractCell.html" rel="nofollow">here</a> for a number of examples of AbstractCell implementations.</p> <p>To answer your question regarding a GWT button:</p> <pre><code>import com.google.gwt.cell.client.AbstractCell; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.user.client.ui.Widget; public class WidgetGridCell extends AbstractCell&lt;Widget&gt; { Widget widget; public WidgetGridCell(Widget widget) { this.widget = widget; } @Override public void render(Context paramContext, Widget param, SafeHtmlBuilder pb) { Button aButton = new Button(); // add text to the button, etc... pb.append(SafeHtmlUtils.fromTrustedString(aButton.toString())); } } </code></pre> <p>It's largely not feasible (and not advisable) to try and render an entire widget within a cell element but it sounds as though you are really trying to render a button from within the cell. </p> <p>AbstractCell is an implementation of the Cell interface which allows you to define the HTML to render within the cell. If you need a button which can respond to events you'll need to define your custom cell to handle browser events (such as the click event). Google does a good job in their documentation on custom cells explaining how you can go about doing that.</p> <p>See this link: <a href="http://www.gwtproject.org/doc/latest/DevGuideUiCustomCells.html" rel="nofollow">http://www.gwtproject.org/doc/latest/DevGuideUiCustomCells.html</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload