// the components all get rendered as disabled, so the browser would not send
// any parameters. thus FormTester must not send any either.
assertTrue(getRequest().getPostParameters().getParameterNames().isEmpty());
}
});
final Component form = tester.getComponentFromLastRenderedPage("form");
form.setEnabled(false);
assertFalse(form.isEnabled());
Component check = tester.getComponentFromLastRenderedPage("form:checkbox");
assertTrue(check.isEnabled());
assertFalse(check.isEnabledInHierarchy());
FormTester formTester = tester.newFormTester("form");
try
{
formTester.submit();
fail("Executing the listener on disabled component is not allowed.");