Skip to content
Advertisement

java.lang.NumberFormatException: For input string: “id” while trying to retrive related table column to jsp selectbox

This question kind of related to a previous one at Could not create query for public abstract org.springframework.data.domain.Page com.example.repository.DocumentsRepository.findBytypeid

Thank to all it was resolved. But now I have an other problem I am trying to make a selectbox with all rows from related column. Here is my JSP form

JavaScript

And part of my controller to add rows:

JavaScript

And I get the following exception:

JavaScript

I am willing to provide more code if nessary, But it duplicates my previous question

I probably should add here my whole controller. May be it will be helpful.

JavaScript

Advertisement

Answer

I think the problem can be a typo in your code In the definition of the var attribute. Please, can you try the following code?

JavaScript

Please, note the change from documenttypesList to documenttypeslist.

In addition, probably you can simplify the form:select expression. Please, try:

JavaScript

Or just:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement