@Test public void linesAreDisabledDuringSubmit() { final TextLine line1 = new TextLine(); form.add(line1); final DummyUiCommand buttonCommand = new DummyUiCommand(); final Button button1 = new Button(); form.add(button1); button1.bind(buttonCommand); button1.getButton().click(); assertThat(line1.getTextBox().isEnabled(), is(false)); buttonCommand.done(); assertThat(line1.getTextBox().isEnabled(), is(true)); }
public void add(final Button button) { button.setForm(this); buttons.add(button); if ("left".equals(button.getSide())) { view.leftActions().add(button); } else { view.rightActions().add(button); } }
Form extends CompositeHasIsWidgets { public void add(final Button button) { button.setForm(this); buttons.add(button); if ("left".equals(button.getSide())) { view.leftActions().add(button); } else { view.rightActions().add(button); } } }
Form extends CompositeHasIsWidgets { public void add(final Button button) { button.setForm(this); buttons.add(button); if ("left".equals(button.getSide())) { view.leftActions().add(button); } else { view.rightActions().add(button); } } Form(); }
Form extends CompositeHasIsWidgets { public void add(final Button button) { button.setForm(this); buttons.add(button); if ("left".equals(button.getSide())) { view.leftActions().add(button); } else { view.rightActions().add(button); } } Form(); void setTitle(final String title); void setAutoFocus(final boolean autoFocus); void add(final Button button); void add(final AbstractLine line); void watch(final Property<?> property); void watch(final Model model); void watch(final UiCommand command); Property<Boolean> valid(); BooleanProperty loading(); Property<Boolean> active(); @VisibleForTesting IsFormView getView(); }
Form extends CompositeHasIsWidgets { public void add(final Button button) { button.setForm(this); buttons.add(button); if ("left".equals(button.getSide())) { view.leftActions().add(button); } else { view.rightActions().add(button); } } Form(); void setTitle(final String title); void setAutoFocus(final boolean autoFocus); void add(final Button button); void add(final AbstractLine line); void watch(final Property<?> property); void watch(final Model model); void watch(final UiCommand command); Property<Boolean> valid(); BooleanProperty loading(); Property<Boolean> active(); @VisibleForTesting IsFormView getView();  }