title: Why is onSubmit is not called in my code?
body: <p><code>onSubmit()</code> isn't called in a WebPage.</p>
  <p>I've already tried it with <code>super.onSubmit()</code>, I've tried to implement it with a Button.</p>
  <p>And and I know for sure that it isn't called, because tries to sysout some <code>String</code>s in the code in the <code>onSubmit</code> - Method.</p>
  <p>Here's the Code:</p>
  <pre><code>Form form = new Form(&quot;setPersonalDataForm&quot;) {
  
          @Override
          public void onSubmit() {
                System.out.println(&quot;If you read this its called&quot;);
              String setPersonalDataEndpoint = new PropertyLoader().getPropValues(&quot;setPersonalData&quot;, &quot;api.properties&quot;);
  
              JSONObject setPersonalDataJson = new JSONObject();
  
              Object uasAccountId = uasAccountIdTextField.getDefaultModelObject();
              Object firstname = firstnameTextField.getDefaultModelObject();
              Object middlename = middlenameTextField.getDefaultModelObject();
              Object surname = surnameTextField.getDefaultModelObject();
              Object companyline1 = companyLine1TextField.getDefaultModelObject();
              Object companyline2 = companyLine2TextField.getDefaultModelObject();
  
              String dateToConvert = birthdateTextField.getDefaultModelObject().toString();
  
              DateConverter dateConverter = (date) -&gt; {
  
                  DateTimeFormatter formatter = DateTimeFormatter.ofPattern(&quot;EEE MMM d H:mm:ss zzz yyyy&quot;, Locale.ENGLISH);
                  ZonedDateTime parsedDate = ZonedDateTime.parse(dateToConvert, formatter);
                  DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd&quot;);
                  Object birthdate = parsedDate.format(formatter2);
  
                  return birthdate.toString();
              };
  
              Object birthdate = dateConverter.convertDate(dateToConvert);
  
              setPersonalDataJson.put(&quot;brand&quot;, selectedBrand);
              setPersonalDataJson.put(&quot;uasAccountId&quot;, uasAccountId);
              setPersonalDataJson.put(&quot;salutation&quot;, selectedSalutation);
              setPersonalDataJson.put(&quot;gender&quot;, selectedGender);
              setPersonalDataJson.put(&quot;firstname&quot;, firstname);
              setPersonalDataJson.put(&quot;middlename&quot;, middlename);
              setPersonalDataJson.put(&quot;surname&quot;, surname);
              setPersonalDataJson.put(&quot;companyLine1&quot;, companyline1);
              setPersonalDataJson.put(&quot;companyLine2&quot;, companyline2);
              setPersonalDataJson.put(&quot;birthday&quot;, birthdate);
  
  
              PageParameters setPersonalDataParameters = new PageParameters();
  
              try {
  
                  ResponseEntity response = new TestService().postTestJson(setPersonalDataJson, setPersonalDataEndpoint);
  
                  String responseBody = response.getBody().toString();
  
                  JSONObject responseJsonObject = new JSONObject(responseBody);
  
                  String testSuccessfull = responseJsonObject.get(&quot;status&quot;).toString();
                  String message = responseJsonObject.get(&quot;message&quot;).toString();
  
                  setPersonalDataParameters.add(&quot;testSuccessfull&quot;, testSuccessfull);
                  setPersonalDataParameters.add(&quot;message&quot;, message);
                  setPersonalDataParameters.add(&quot;requestJson&quot;, setPersonalDataJson.toString());
                  setResponsePage(ResponsePage.class, setPersonalDataParameters);
  
              } catch (Exception e) {
  
                  setPersonalDataParameters.add(&quot;testSuccessfull&quot;, &quot;failed&quot;);
                  setPersonalDataParameters.add(&quot;requestJson&quot;, setPersonalDataJson.toString());
              }
              setResponsePage(ResponsePage.class, setPersonalDataParameters);
          }
      };
  </code></pre>
  <p>Does anyone know why it isn't called and how to fix this?
  Thanks in advance!</p>