@Override
protected void onSubmit() {
Address address = new Address(streetName, houseNumber, postalCode, city, "Nederland");
CustomerInfo info = new CustomerInfo(name, email, address);
Response response = bus.sendAndWaitForResponse(new CreateCustomerCommand(VersionedId.random(), info, initialAccountBalance));
System.err.println("response: " + response);
for (ValidationError validationError : response.getRepliesOfType(ValidationError.class)) {
error(validationError.getErrorMessage());
}
if (!hasError()) {
setResponsePage(CustomersPage.class);
}