@Test public void debugId() { StubTextBox t = new StubTextBox(); TakesValue<String> id = TakesValues.debugId(t); id.setValue("foo"); assertThat(t.getIsElement().getAttribute("id"), is("foo")); assertThat(id.getValue(), is("foo")); }
public static TakesValue<String> debugId(final IsWidget w) { return new TakesValue<String>() { @Override public void setValue(String value) { w.ensureDebugId(value); } @Override public String getValue() { return w.getIsElement().getAttribute("id"); } }; }
TakesValues { public static TakesValue<String> debugId(final IsWidget w) { return new TakesValue<String>() { @Override public void setValue(String value) { w.ensureDebugId(value); } @Override public String getValue() { return w.getIsElement().getAttribute("id"); } }; } }
TakesValues { public static TakesValue<String> debugId(final IsWidget w) { return new TakesValue<String>() { @Override public void setValue(String value) { w.ensureDebugId(value); } @Override public String getValue() { return w.getIsElement().getAttribute("id"); } }; }  }
TakesValues { public static TakesValue<String> debugId(final IsWidget w) { return new TakesValue<String>() { @Override public void setValue(String value) { w.ensureDebugId(value); } @Override public String getValue() { return w.getIsElement().getAttribute("id"); } }; }  static TakesValue<String> textOf(final HasText target); static TakesValue<String> textOf(final IsElement target); static TakesValue<String> innerTextOf(final IsWidget target); static TakesValue<String> htmlOf(final HasHTML target); static TakesValue<String> htmlOf(final IsElement target); static TakesValue<String> urlOf(final IsImage target); static TakesValue<String> debugId(final IsWidget w); static SetsValue<String> debugIdSuffix(final HasEnsureDebugIdSuffix w); static TakesValue<String> styleOf(final HasCss target); static TakesValue<String> attributeOf(final IsElement target, final String attribute); }
TakesValues { public static TakesValue<String> debugId(final IsWidget w) { return new TakesValue<String>() { @Override public void setValue(String value) { w.ensureDebugId(value); } @Override public String getValue() { return w.getIsElement().getAttribute("id"); } }; }  static TakesValue<String> textOf(final HasText target); static TakesValue<String> textOf(final IsElement target); static TakesValue<String> innerTextOf(final IsWidget target); static TakesValue<String> htmlOf(final HasHTML target); static TakesValue<String> htmlOf(final IsElement target); static TakesValue<String> urlOf(final IsImage target); static TakesValue<String> debugId(final IsWidget w); static SetsValue<String> debugIdSuffix(final HasEnsureDebugIdSuffix w); static TakesValue<String> styleOf(final HasCss target); static TakesValue<String> attributeOf(final IsElement target, final String attribute);  }