Unfortunately, I'm still having problems with this. My form bean contains 3 collections, one for each type of exception I'm dealing with. Each of those collections contains a list of beans, which, individually, represent a single exception.
Here's a look at my form bean:
For now, let's just concentrate on one Collection of the three - let's say we're going to look at the Blood Pressure Exceptions. The Collection bloodPressureException contains a number of BloodPressureException objects, that look like this (they're not Exceptions in the normal sense as they don't get thrown - they're exceptions to business rules):
As you can see, BloodPressureException is just a simple
Java Bean. Now, in order to display this information to the user, I use a
JSP that looks something like this:
Using that, I get a nice display of all the information in tables displayed top to bottom. The actual HTML that is generated looks like this:
Okay - so far, everything works great. I can display all of my information to the user and it all appears in nice, editable fields so that the user can fix errors and resubmit the data for processing.
My problem really arises when I need Struts to take the information that is submitted into the request and insert it into my form bean. I don't know what the signature of the method(s) it is calling and I can't seem to get it right, either.
My inclination, since each field is named exceptionBean[n].propertyName was that my form bean would need a method with this signature:
Once it has the BloodPressureException object, it would simply invoke the setXXX() method, based on the property that it was trying to set.
Unfortunately, this doesn't seem to work. I've added that method to my form bean (and a few variations of it), but none of them are invoked. Anyone have any ideas?
Thanks,
Corey