Hi Tom,

I saw a long thread last year on this mailing list discussing this subject. I can't remember the details but I do remember the person declared their success at the end. If you have a good search in the mail list archives on DynaActionForms and similar words, you are bound to find it.

One restraint struts forces on you is that you can only have one form for an action, i.e. on form definition, one form in your action mapping and one form passed to your action as a parameter. But I think that you would only define the simplest dynaactionform in the struts-config and then add to it dynamically in the init or reset methods.

You would have to write your own DynaActionForm child class that extends DynaActionForm to do that, and declare it as struts-config's <form-bean...> type.

Hope that helps,
Adam

PS You must be the Thomas Stockhammer I worked with on APLA? How's it going? (plz mail me off-list at adam.hardy at cyberspaceroad.com)



On 02/11/2004 12:48 PM Stockhammer Thomas wrote:
Hi all,

In my application i want to generate dynamic forms, that means the number of
controls placed on the forms depends on the entries in a config-tabel of a
database.
That means I can add a textbox to a database by adding a record to the
config-table. Additionally i can show different forms to different users by
adding roles to the config-table. The generation of the forms should be done by a servlet that converts
xml-strings to forms...
Does struts give any support for validation of such forms (DynaActionForms)
and handle parameters via getXXX and setXXX


Or is the only way to do validation in such a form via javascript
and to handle parameter via request.getParameter(...

Tank you Regards
Tom




--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to