How to get object type parameter in Spring MVC Portlet

I am working on Spring Portlet MVC. I have a table whose name is "CLASS". The CLASS table has composite primary keys. I want to use the CLASS table in another table. I want to list the elements of a CLASS table in a combo box.

When the combobox is selected I have to get the CLASS compound ids. But I cannot get the ID. Since id is a CLASSID type. (And id is an object), I only get int, string .. type parameters from the combobox.

Can I get an object from a combobox? And if so, how to do it?

Sincerely.

  <form:select path="classId">          
            <form:options items="${classes}" itemValue="id" itemLabel="name" />
  </form:select>

      

classId is an object. I can get name values ​​and other values ​​from an array of classes. But I cannot get the classId value. It returns null. How can I get the entity type parameter in Spring Portlet MVC?

+3


source to share


1 answer


check "Type Conversion" to convert your id to string and vice versa, check it in spring link here



0


source







All Articles