setFormSubmittingComponentValue((IFormSubmittingComponent)component, value);
/** * Simulates filling in a field on a <code>Form</code>. * * @param formComponentId * relative path (from <code>Form</code>) to the selectable * <code>FormComponent</code> or <code>IFormSubmittingComponent</code> * @param value * the field value */ public void setValue(final String formComponentId, final String value) { checkClosed(); Component component = workingForm.get(formComponentId); if (component instanceof IFormSubmittingComponent) { setFormSubmittingComponentValue((IFormSubmittingComponent)component, value); } else if (component instanceof FormComponent) { setFormComponentValue((FormComponent)component, value); } }
/** * Simulates filling in a field on a <code>Form</code>. * * @param formComponent * relative path (from <code>Form</code>) to the selectable * <code>FormComponent</code> or <code>IFormSubmittingComponent</code> * @param value * the field value * @return This */ public FormTester setValue(final Component formComponent, final String value) { Args.notNull(formComponent, "formComponent"); checkClosed(); if (formComponent instanceof IFormSubmittingComponent) { setFormSubmittingComponentValue((IFormSubmittingComponent)formComponent, value); } else if (formComponent instanceof FormComponent) { setFormComponentValue((FormComponent<?>)formComponent, value); } else { fail("Component with id: " + formComponent.getId() + " is not a FormComponent"); } return this; }
/** * Simulates filling in a field on a <code>Form</code>. * * @param formComponent * relative path (from <code>Form</code>) to the selectable * <code>FormComponent</code> or <code>IFormSubmittingComponent</code> * @param value * the field value * @return This */ public FormTester setValue(final Component formComponent, final String value) { Args.notNull(formComponent, "formComponent"); checkClosed(); if (formComponent instanceof IFormSubmittingComponent) { setFormSubmittingComponentValue((IFormSubmittingComponent)formComponent, value); } else if (formComponent instanceof FormComponent) { setFormComponentValue((FormComponent<?>)formComponent, value); } else { fail("Component with id: " + formComponent.getId() + " is not a FormComponent"); } return this; }