Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda