On Mon, 20 Jan 2003, Giri Alwar wrote:

>
> I have a question for the folks in general. What is the main reason for
> using the DynaActionForm class (as opposed to writing your own ActionForm)?

That's it in a nutshell :-).  Having to write fewer classes is goodness.

> While you don't have to write your own class with DynaActionForm, aren't you
> restricting yourself to using Struts taglibs (especially the bean taglibs?).

You're certainly dependent on commons-beanutils.

> What if you want to use JSTL now or sometime in the future?

If you look closely at the public API for DynaActionForm, you'll see the
getMap() method.  This returns the name/value map for the properties of
the DynaBean, and makes it pretty easy to use JSTL with DynaActionForm
beans.  For example, the following are essentially equivalent:

  <bean:write name="customer" property="name"/>

  <c:out value="${customer.map.name}"/>

if "customer" points at a DynaActionForm bean.

> With the IDE's
> that we all use today, creating an ActionForm class with getter/setter
> methods is a breeze. Hence, what do you truly gain by using DynaActionForm?

Not everyone has (or likes) an IDE.

> Giri


Craig


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

Reply via email to