The closest thing that I found is the DynaActionForm, which just allows you to specify all of the fields in the struts-config.xml file and not have to write your own validation bean ... but you have to know your fields. In your case, you don't know then ahead of them or they may be different each time.
Basically what I did was pass the name, type, and default values as hidden variables to my validation servlet and let it handle the rest. Struts is not well suited to some tasks.
I'll keep reading this forum though to see if someone else knows how to do it. I'm willing to change, but for now, what I have works.
Originally posted by Rohit Poddar:
I have a requirement where the HTML form input paramater names are dynamically generated and hence I cannot have them as property in ActionForm bean. How can I handle this in Struts framework? The input field I am trying to use will of type select.
Though newbiw to Struts and just two days back I understand power of struts [using struts tag in jsp. Wow its really seperate view from logic, now we need one good editor which can color differently struts tags.]
If you know max number of select then you can have member variables in Form beanm though most of them will be null.
Else you can give same name to all select and then can have one array as member var of FormBean.