magno32 (1) [Avatar] Offline
I have a question about Section 5.5.6 in Chapter 5.

I'm trying to get the second bullet working but am having a good bit of trouble.

Without digging too much, I wanted to mention that the code snippet with the field:select tag is missing the 2 required values "items" and "path". These are also omitted from the source code (checked out from git). It is quite possible that I will still have problems even if those values were filled, but perhaps their correct values for a custom ModelAttribute method would help.

ken.rimple (246) [Avatar] Offline
Re: Chapter 5 View Enhancement - Lists of Values
Sorry, I just saw this. I'll put it on my list of things to check.

ken.rimple (246) [Avatar] Offline
Re: Chapter 5 View Enhancement - Lists of Values
Quick question - we've split some of the chapter 5 content into the next chapter now - are you talking about providing reference data, as in:

public Collection<Offering> OfferingController.populateOfferings() {
return Offering.findAllOfferings();

If so, yes, you'd need to use the Spring Roo tag select.tagx:
<field:select >

Path should have been there, but if you are providing the offering ID, here is the way Roo is using it in chapter-06/coursemanager.../registrations/create.jspx:

<field:select field="offering" >
itemValue="id" items="${offerings}" path="/offerings"

You could easily add itemLabel="runDate" or something like that from the fields of the offering.

I don't know that I have an example in there with the original Spring MVC tags, but they would use the path item too.

Let me know if I'm on the right path here with your question. Sorry it took me a while to see this one - I had been working on a time sensitive project from before Christmas until last week.