Thank you for your help, Michael.
In my
JSP I have:
I am now getting the error:
"Cannot find bean under name name" - so it is expecting the labelName attribute to be a bean
My form bean has a field "office" with the associated getOffice() and setOffice() methods.
The relevant parts of my User bean are:
And my Office bean is:
You say I need to set up two collections, one for the OfficeID (here I called it "num") and one for the name - can I not have one collection of beans, each bean having a method for num and a method for name. It seems much cleaner this way.
Should I be using the collection attribute in the option tag? Trouble is it expects a collection of beans, and all I can offer is the user bean which has a collection of office beans as an instance variable - I have tried the attribute:
collection="user.getOffices()", but to no avail.
How can I store a collection of beans as a bean? - surely I can only store a collection of beans as an ArrayList (or some other
Java collection)?
Thanks
Tim