struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fenderbosch, Eric" <Eric.Fenderbo...@fedex.com>
Subject RE: How do I populate a DynaValidatorForm?
Date Fri, 26 Sep 2003 13:05:57 GMT
Where do you specify the
@struts.form-field (0..*)
tags so that XDoclet creates the form for you?
Right now, I have a hand coded form and XDoclet creates the <form-bean/> section of
my struts-config for me, but I'm not creating the actual ActionForm subclass with XDoclet.

-----Original Message-----
From: Pratik Patel [mailto:prpatel@ibiblio.org]
Sent: Friday, September 26, 2003 06:53
To: struts-user@jakarta.apache.org
Subject: Re: How do I populate a DynaValidatorForm?


> "DynaActionForms are not a drop-in replacement for ActionForms. If you
> need to access ActionForm properties in your Action, you will need to
> use the map-style accessor, like myForm.get("name"). If you actively use
> the ActionForm object in your Action, then you may want to use
> conventional ActionForms instead."

Why aren't you just using ActionForms? To be honest, I never use 
DynaActionForms. Sure, there's an extra Java class that needs to be 
written, but I find it easier to write an ActionForm class than write 
out a XML descriptor for a DynaActionForm. Plus it's easier to unit test 
  a concrete class than one that assumes its properties at runtime. If 
you're too lazy (like me) to actually write the ActionForm class, just 
use XDoclet to generate one for you.


cheers,
Pratik



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message