Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
public class ItemWidget extends Composite {
  @Inject private @Bound @DataField Label name;
  @Inject private @Bound @DataField Label comment;
  @Inject private @Bound(property="") @DataField Label department;
  private @Bound(converter=RelativeTimeConverter.class) @DataField
  final Element addedOn = DOM.createSpan();
  private @Bound(converter=UsernameConverter.class) @DataField
  final Element addedBy = DOM.createSpan();
  public void onMouseOver(MouseOverEvent event) {
    ..println("MouseOver " + .getModel().getName());
  public void onMouseOut(MouseOutEvent event) {
    ..println("MouseOut " + .getModel().getName());

Changes the model object visualized by this class to the given one.

item The item that should become the model of this class. Must not be null.
The proxied version of the given item object, for purposes of data binding. If you intend to make any changes to the state of the item after adding it to this widget, you must do so via this returned proxy. If you modify the item directly (rather than via the proxy) then this UI widget will not update.
  public Item setItem(Item item) {
    ..println("ItemWidget: adopting model object " + System.identityHashCode(item));
    return .setModel(item.);
New to GrepCode? Check out our FAQ X