Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
getting binding exception at base controller, html input tag sends empty string and trying to set in date object of modal class

I have Student modal class where two utils date objects are there and form field related to this are not mandatory, so whenever I don't enter any value in form date picker its throwing binding exception at base controller as we cant set '' to Date object

I am not able to set null from JavaScript to date form field explicitly if its value is blank.

There are two solution to this problem but I am searching for the good one and not the 'JUGAAD'

Solution 1: if form field is blank set value as '1000-10-10'or something like this in javascript before submitting the form , so that it wont try to set empty string to date object and binding exception wont come

Solution 2: Create string instance variable in modal class and store form value to this string object first and later at Dao level we can check the value whether its blank or any Date and then set Date instance variable accordingly.

is there any other better solution than this

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!