Any draw backs of using DYNA FORM BEANS....?

2002-06-13 Thread Rajesh Kalluri


Hi All,

I justed wanted to see what the genral feeling is about using DYNAFORMBEANS
instead of plain old Action Forms, in terms of

-- using them with a validator
-- transferring the data to a value object aka data tranfer object to hsip
it to the next layer
  (what is the preferred approach to do this using dyna beans)
-- Has any one tried to wrap value objects with a dyna bean to make the
retreival easy ofcourse or otherwise.



Any feed back is highly appreciated

Regards
Raj


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




Re: Any draw backs of using DYNA FORM BEANS....?

2002-06-13 Thread Rick Reumann

On Thursday, June 13, 2002, 11:03:04 AM, Rajesh wrote:

RK I justed wanted to see what the genral feeling is about using DYNAFORMBEANS
RK instead of plain old Action Forms,

I'm loving them. Chuck has shown me the light:)
You should read this chapter here
http://www.theserverside.com/resources/strutsreview.jsp
you might have to register if you aren't (free).
At the bottom he talks about DynaForms.

RK in terms of

RK -- using them with a validator

Piece of cake. I'm using
type=org.apache.struts.validator.DynaValidatorForm
to define the dynaForm in the struts-config.xml

RK -- transferring the data to a value object aka data tranfer object to hsip
RK it to the next layer

Very easy also. It's only slightly different to access your
properties. In an Action:

DynaActionForm f = (DynaActionForm)form;
String userName = (String)f.get(userName);

similarly with settters:
f.set(userName, userName );

I have a helper class that builds a DTO accepting the DynaForm as
a parameter...ie:
userDTO =  ObUsersHelper.makeUserDTOfromDAF( dynaForm );

RK   (what is the preferred approach to do this using dyna beans)
RK -- Has any one tried to wrap value objects with a dyna bean to make the
RK retreival easy ofcourse or otherwise.

Haven't use dyna beans so I can't help you there.

RK Any feed back is highly appreciated

RK Regards
RK Raj


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



-- 

Rick
mailto:[EMAIL PROTECTED]

A wise man would pick up a grain of sand and see the entire universe,
a stupid man would get naked, role in seaweed, and stand up and say,
'Look, I'm vine man.' 
  -Jack Handey


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