call the onSubmit method from the panel.