I am currently getting into Spring-Roo and Spring-MVC. I have a pretty simple app that Roo created for me. It consists of two objects: Record and Car, where Record has a link to one car.
After the initial setup, I change one of the views for using the field: select and display the combo box to select available cars and add them to the entry.
<field:select field="car" id="c_de_recordcars_domain_Record_car" items="${cars}" path="/cars" />
This tag gives me a headache. Since the comboxbox currently displays all available cars ... but it does it by displaying all attributes (for example, "Car 1 Tue Jan 18 00:00:00 CET 2011 Friver1"). All I want is that the name attribute ("Car 1") is displayed in the combo box.
Inside the tag there is only the attribute "itemValue" -Attribute, but this only displays the value that is placed in the request parameter ... I need something like "displayValue", where I can point to the java field that is used for display.
How can i achieve this? Thanks
lostiniceland
source share