I have two textboxes and one submit button in my program.when i provide some inputs and hit the submit button it works fine. When am not entering anything in the textboxes and hit the submit button , it is not working. It throwed the null pointer exception when form submit.
Error is below.
WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form1]] threw an exception
Root cause:
java.lang.NullPointerException
at com.usaa.application.pages.HomePage$3.onSubmit(HomePage.java:158)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1518)
at org.apache.wicket.markup.html.form.Form.process(Form.java:914)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876)
How to handle this error , please help me ...
Thanks, Kumar