Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda