I'm trying find a way to have a more robust mapping of multibox data from a jsp page to a struts form. My question is, is the multibox tag bound specifically to a String Array in the struts form? Or could I use something like a map, or list, etc...something that is a bit more dynamic?
For example...if my multibox is bound to a property in my form called "selectedThings," does "selectedThings" have to be a String?
Bryan, this struts API link says that it takes only primitive array types may be not Maps..
Have Fun with Java
little,little.. little by little makes a lot..
Joined: Jun 16, 2003
Yeah, that limits the robustness a bit.
As a solution I simply created a String inside one of my beans which was a field in the form. Although it added a layer of complexity when linking the specific checkbox with the specific String in each bean, it works well.
Finally it is done, may be you can have a wrapper/generic class (since ther is no more upgrade to the struts version (1.x) being used) like formHelper which would help you for other similiar scenarios in future as well..