Frage

What does DynaActionForm in struts actually do? It is said that "if we develop more and more struts application or Action classes then more and more ActionForms have to be created. Means, ActionForm for just about every piece of business logic that we would like to perform. This is time comsuming."

So DynaActionForm comes into picture which we are creating in struts-config.xml file.

But still we will have to create equal DynaActionFrom for those many business Aciton in struts-config.xml file for mapping.

Writing ActionFrom (not DynaActionForm ) is much more flexible ?

Please explain, How dynaActionForm behaviour ?

War es hilfreich?

Lösung

DynaActionForms don't require any (or much) Java code; ActionForms do.

This is stated in the docs:

Instead of creating a new ActionForm subclass and new get/set methods for each of your bean's properties, you can list its properties, type, and defaults in the framework's configuration file.

Andere Tipps

The real purpose of DynaActionForm is during the creation of a prototype. At this time it will help the page developer who may not be very much familiar with the jsp to create a DynaForm and get the prototype working he doesn't need to get into the details of wroking in the java code.

But it is always better to create ActionForm than using DynaForm in the projects.

More detailed explanation

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top