struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <>
Subject Re: [FORMDEF] Resetting booleans for session-scoped dynaforms
Date Wed, 12 Oct 2005 21:07:50 GMT
On 10/12/05, Michael Jouravlev <> wrote:
> I really want to use your stuff, but I need to differentiate between
> request types (more generally, between input and output phases, but in
> 95% of cases it boils down to request type).

It seems your concerns are outside the scope of FormDef.

FormDef scope is limited to configuring the form beans upon startup,
and any other method the Action itself calls.  Aside from that,
nothing else changes.  The following might help (I might add these to
the FAQ):

1) How are the form beans that FormDef configure different from normal
form beans?

They're the same.  FormDef uses the form bean class that you configure:
<form name="myForm"

If you don't specify the formType, FormDef will use DynaActionForm by default.

Struts will not be able to distinguish between a form bean configured
in struts-config.xml or those configured by FormDef.  Any features or
limitations of existing form beans still apply.  You can use custom
dyna forms the way you'd use them if you configure form beans in

2) How does FormDef change how Struts populates the form bean with
values from request parameters?

It doesn't.  FormDef doesn't change the way your forms are populated
or initialized by Struts.

3) Can I still use BeanUtils.copyProperties() or my own custom way of
converting between form beans and my business objects if I configure
my form bean through FormDef?

Yes.  You can use FormDef to generate your form bean definitions for
you and not use any other FormDef feature if you so desire.

Any conversion support provided by FormDef only kicks in if you call
FormUtils.getFormValues()/setFormValues() inside your Action.

You can continue to use BeanUtils.copyProperties() or any other way to
get values from your form bean to your business object and vice versa.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message