Re: ActionForm and Transfer Object

2004-08-26 Thread Deepak
Message - From: "Yves Sy" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, August 26, 2004 1:16 PM Subject: RE: ActionForm and Transfer Object The problem with that approach is you'll end up putting you

RE: ActionForm and Transfer Object

2004-08-26 Thread Yves Sy
eckbox handling via the reset() method. Regards, -Yves- > -Original Message- > From: Deepak [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 3:23 PM > To: Struts Users Mailing List > Subject: Re: ActionForm and Transfer Object > > I like passing a TO into

Re: ActionForm and Transfer Object

2004-08-26 Thread Deepak
Sent: Wednesday, August 25, 2004 11:26 PM Subject: Re: ActionForm and Transfer Object > Sure Rick, and "where should me do it" might be a good > discussion (like the one that we`re all going on right > now). > > A few months ago i had a similar discussion in a > forum.

Re: ActionForm and Transfer Object

2004-08-25 Thread Leandro Melo
Sure Rick, and "where should me do it" might be a good discussion (like the one that we`re all going on right now). A few months ago i had a similar discussion in a forum. Is someone is interested to hear more opinions, here it is http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topi

Re: ActionForm and Transfer Object

2004-08-25 Thread Rick Reumann
Leandro Melo wrote: Rick, i agree with you, i also use BeanUtils to populate my forms. But, this doesn't go far way from having your ActionForms dependent on your TOs (or CustomTOs, doesn' t matter). Well I wouldn't say they are 'dependent' on each other except that it makes it easier if the prop

Re: ActionForm and Transfer Object

2004-08-25 Thread Rick Reumann
Sebastian Ho wrote: I thought of putting the TO in session as well to prevent another DB call. This will work but if you are using a decent persistence mechanism another call to your backend layer will have the results of that query cached so the performance hit is extremely minimal. And unless t

RE: ActionForm and Transfer Object

2004-08-25 Thread Jim Barrows
> -Original Message- > From: Joe Hertz [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 25, 2004 9:22 AM > To: 'Struts Users Mailing List' > Subject: RE: ActionForm and Transfer Object > > > > > 1) If you have a page which will update fi

RE: ActionForm and Transfer Object

2004-08-25 Thread Joe Hertz
> > 1) If you have a page which will update field A, but have > > field B as hidden, > > and while the user on this screen is on the phone, someone > > else updates > > field B, when the user saves his record, the other guy's > > field B will be > > overwritten. > > You have this race condition

RE: ActionForm and Transfer Object

2004-08-25 Thread Jim Barrows
> -Original Message- > From: Sebastian Ho [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 11:22 PM > To: Struts Users Mailing List > Subject: ActionForm and Transfer Object > > > Hi > > People have been telling me that ActionForm should not be dependent on > your TO. Simple

RE: ActionForm and Transfer Object

2004-08-25 Thread Jim Barrows
> -Original Message- > From: Joe Hertz [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 25, 2004 8:51 AM > To: 'Struts Users Mailing List' > Subject: RE: ActionForm and Transfer Object > > > Seems to me that the issue is in how you go about hitt

RE: ActionForm and Transfer Object

2004-08-25 Thread Joe Hertz
y just view source on the html and discover how to directly manipulate the database in ways you may or may not want. > -Original Message- > From: Leandro Melo [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 25, 2004 10:18 AM > To: Struts Users Mailing List > Subject: Re: A

Re: ActionForm and Transfer Object

2004-08-25 Thread Michael McGrady
I have been trying out a new solution to this "age-old" conundrum. I have a UserContainer implements Map object in the Session object. The UserContainer object implements the Map as indicated in my http://wiki.apache.org/struts/StrutsCatalogInstrumentableForms, except that the UserContainer d

Re: ActionForm and Transfer Object

2004-08-25 Thread Leandro Melo
Rick, i agree with you, i also use BeanUtils to populate my forms. But, this doesn't go far way from having your ActionForms dependent on your TOs (or CustomTOs, doesn' t matter). As Sebastian said, i've heard a lot that TOs should mirror or shouldn't be coupled to your ActionForms, but i really d

Re: ActionForm and Transfer Object

2004-08-25 Thread Deepak
If you make TO part of your form, life will be much easier. e.g. public class PlayerDetailsForm extends ValidatorForm { private PlayerDetailsTO mPlayer; public void setPlayerDetails(PlayerDetailsTO player) { mPlayer = player; } public PlayerDetailsTO getPlayerDetails() { return m

Re: ActionForm and Transfer Object

2004-08-25 Thread Sebastian Ho
I don't really like the first solution. Second solution sounds promising but there's an extra call. But thats still better than the first solution or using hidden fields in JSP. I thought of putting the TO in session as well to prevent another DB call. But that will make everything very confusing

Re: ActionForm and Transfer Object

2004-08-25 Thread simarjit singh
Hi, I think the usual convention of not using ActionForm in Business tier is to separate these tiers. This helps to reduce business tier dependency on Web tier. I read a design pattern and modified it to my needs . Here is what i do. 1. Make a tagging interface like AppForm which is generalize

Re: ActionForm and Transfer Object

2004-08-24 Thread Rick Reumann
Sebastian Ho wrote: Say I retrieve a TO from database and convert it into a actionForm for display. In this case I have 4 fields for my actionForm but 10 in my TO. (6 are not needed for display). A user updates the 4 fields and the action convert those into TO. In this case, the other 6 fields will