RE: Using struts forms as Value Objects: your opinion?

2005-08-09 Thread Rivka Shisman
Hi friends, After a long discussion about the above subject - I found a related article, which was very interesting for me (as new to Struts) and I would like to forward it to you and will be happy to read your comments to it. It's called Struts Live Chapter: Nested POJOs and you can find

Re: Using struts forms as Value Objects: your opinion?

2005-07-13 Thread Rick Reumann
Laurie Harper wrote the following on 7/12/2005 8:25 PM: Rick Reumann wrote: (By the way I pass in an optional default format in my constructor as shown above, but my converters have a setFormatPattern(..) method that can change the format at any time) Don't you end up with thread safety

Re: Using struts forms as Value Objects: your opinion? BeanUtil C onverter

2005-07-12 Thread Craig McClanahan
On 7/11/05, Nitish Kumar [EMAIL PROTECTED] wrote: This is a HUGE problem with BeanUtils and why I end up having to register custom converters:( good point, but where do I register my custom converters? I dont want to do it in my action classes, and writing a plugin just to register my

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Craig McClanahan
On 7/11/05, Borislav Sabev [EMAIL PROTECTED] wrote: Rick Reumann wrote: You shouldn't want a default at all provided by BeanUtils for cases where it can be null! You are using the anomoly of the way Integer is working and wanting to propogate that poor solution. null should be null..

RE: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rivka Shisman
- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 8:06 AM To: Struts Users Mailing List Subject: Re: Using struts forms as Value Objects: your opinion? On 7/11/05, Rivka Shisman [EMAIL PROTECTED] wrote: Hi guys, Borislav - thank you for the time you spent debugging

Re: Using struts forms as Value Objects: your opinion? BeanUtil C onverter

2005-07-12 Thread Borislav Sabev
Nitish Kumar wrote: This is a HUGE problem with BeanUtils and why I end up having to register custom converters:( good point, but where do I register my custom converters? I dont want to do it in my action classes, and writing a plugin just to register my converters would be a big overhead.

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Craig McClanahan
On 7/12/05, Rivka Shisman [EMAIL PROTECTED] wrote: Hi Craig I understand that you did not follow this thread from the beginning. As I mentioned before - when working with int, short, byte types - my app works fine. I don't get any runtime exception! If you are not getting an exception in

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Craig McClanahan wrote: Blame backwards compatibility. By the time this issue was raised, there were huge numbers of applications already dependent on the previous behavior, which would have been broken by a change. However, this shouldn't have *any* impact on incorrect values in forms. If

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread netsql
Rivka Shisman wrote: Is it crucial for the Action Form to have String properties? Yes. Http/html is a String protocol. A user types in a string in your forms (unless it's a callendar tag for dates) rambles on: Only exception is if you have R/O, only getters, that you would not even

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Yaroslav Novytskyy
In JDNC, it's all native... (collections in my case) ...and what JDNC is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Ted Husted
In my experience, maps can be better when the database is driving. When the purpose of the application is to expose the database, then most of the map attributes can correspond directly to database fields. You can also use the same tokens. If the database calls the fact birth_date, then the fact

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Ted Husted wrote: In my experience, there's at least two best practices for every problem. Sometimes you waterfall, and sometimes you agile. Sometimes you hibernate, sometimes you ibatis. Sometimes, you property, and sometimes you map. One-size-fits-all is the pointy-hair grail :)

RE: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Durham David R Jr Ctr 805 CSPTS/SCE
Is it crucial for the Action Form to have String properties? Five years of history with Struts (and I should know, since I created it originally) says yes :-) I think it's reasonable to have a numeric type for select-box. - Dave

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Borislav Sabev wrote the following on 7/12/2005 3:20 AM: In fact I'm a bit confused what exactly is the recommended design pattern in this case ... My conclusion is really to use Strings, Yes, you should use Strings in your ActionForms. Then you have your business object POJO with the

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Durham David R Jr Ctr 805 CSPTS/SCE wrote the following on 7/12/2005 10:09 AM: Is it crucial for the Action Form to have String properties? Five years of history with Struts (and I should know, since I created it originally) says yes :-) I think it's reasonable to have a numeric type for

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Rivka Shisman wrote the following on 7/12/2005 3:22 AM: I understand that you did not follow this thread from the beginning. As I mentioned before - when working with int, short, byte types - my app works fine. I don't get any runtime exception! I don't think you tried what Craig proposed.

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Rick Reumann wrote: Borislav Sabev wrote the following on 7/12/2005 3:20 AM: In fact I'm a bit confused what exactly is the recommended design pattern in this case ... My conclusion is really to use Strings, Yes, you should use Strings in your ActionForms. Then you have your business

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Laurie Harper
Rick Reumann wrote: (By the way I pass in an optional default format in my constructor as shown above, but my converters have a setFormatPattern(..) method that can change the format at any time) Don't you end up with thread safety issues calling setFormatPattern() though? I would want to

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi Erik You said - My form class fields are always Strings (because of HTTP) - I'm not sure I anderstand the meaning of this - why do the fields are Strings? I have recently started working with struts and my forms contain int, short, boolean and so on, and it works

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's a valid number in the

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's a valid number in the

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread raghavendra
Raghavendra.E -- Programmer Analyst -Original Message- From: Rivka Shisman [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 3:36 PM To: Struts Users Mailing List Subject: RE: Using struts forms as Value Objects: your opinion? Hi again When you say that validation

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
-Original Message- From: Borislav Sabev [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 11:27 AM To: Struts Users Mailing List Subject: Re: Using struts forms as Value Objects: your opinion? Rivka Shisman wrote: Hi again When you say that validation doesn't work when inserting ABC

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi Borislav I did the test and it works fine - In my form I have: private int question_no; public void setQuestion_no(int i) { this.question_no = i; } public int getQuestion_no() { return question_no; } public ActionErrors validate(ActionMapping mapping,

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Nitish Kumar
Shisman [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 5:13 PM To: Struts Users Mailing List Subject: RE: Using struts forms as Value Objects: your opinion? Hi Borislav I did the test and it works fine - In my form I have: private int question_no; public void setQuestion_no(int i

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Ted Husted
On 7/8/05, Craig McClanahan [EMAIL PROTECTED] wrote: +1 as well, and this matches the historical reason that form beans were invented in the first place. Form beans are part of the *view* tier, not the model ... their purpose in life is to represent the server side state of the HTML

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Nitish Kumar wrote: I think raghavendra is right. Rivka, your code is working because you are using primitive type int and not the wrapper type Integer. In case of primitive type in case of any exception, it gives you a default value. Thanks and Regards, Nitish Kumar I don't think

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Laurie Harper
Ted Husted wrote: In my own work, I tend to think of an enterprise-grade application as a set of overlapping rings, like the Olympics logo. * http://www.olympic.org/ In the Blue ring... Nice analogy! :-) -- Laurie, Open Source advocate, Java geek and novice blogger:

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Leon Rosenberg
Auftrag von Laurie Harper Gesendet: Montag, 11. Juli 2005 18:31 An: user@struts.apache.org Betreff: Re: Using struts forms as Value Objects: your opinion? Ted Husted wrote: In my own work, I tend to think of an enterprise-grade application as a set of overlapping rings, like the Olympics

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Leon Rosenberg
Auftrag von Laurie Harper Gesendet: Montag, 11. Juli 2005 18:31 An: user@struts.apache.org Betreff: Re: Using struts forms as Value Objects: your opinion? Ted Husted wrote: In my own work, I tend to think of an enterprise-grade application as a set of overlapping rings, like the Olympics

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/7/05, Laurie Harper [EMAIL PROTECTED] wrote: Personally I prefer to keep form beans and value objects seperate, for two key reasons: 1) form beans generally should consist of String data to facilitate round-tripping of invalid inputs. I like to constrain them to a clearly defined role

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Ted Husted
There's probably something to that, Leon. Of course, there's nothing new here, except maybe the metaphor. Using the layers pattern in enteprise applications is well known. I believe Bushman describes it in POSA. Here's another online treatment: * http://www.stevenblack.com/PTN-Layers.asp -Ted.

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Michael Jouravlev [EMAIL PROTECTED] wrote: JSF still differentiates real object (whatever it might be, a real business object or a VO) from visual component data, which I don't like. From my point of view, it is much easier to have an object with an ID, to view/edit it, or to

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Nitish Kumar wrote: I think raghavendra is right. Rivka, your code is working because you are using primitive type int and not the wrapper type Integer. In case of primitive type in case of any exception, it gives you a default value. Thanks and Regards, Nitish Kumar So after small

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Borislav Sabev wrote the following on 7/11/2005 1:37 PM: In case of the Integer there is pre-load default value and EVEN if conversion fails during the population phase, it just use is the dafault value (and you think it's parsed correctly). In the previous example its a coincidence that

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
of course... I use Collections (Maps and Lists) as VO/DTO. You can wrap them w/ DynaMaps, you can validate a map, you don't have to maintain deprecated gets/sets, it reduces duplication... your dao can return a map/collection/list... I think it vastly simplifies to use Maps in places

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 2:15 PM: I think it vastly simplifies to use Maps in places where I used to use beans. (I even got rid of baseBeans domain how much I loved maps) Vic I think you sleep with the Map API under your pillow at night or use it as a Teddy Bear when you

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Larry Meadors
Hmm, of course, who needs things like refactoring, and compile time name and type checking? That's why you have users, eh? They'll find the bugs eventually. ;-) Larry On 7/11/05, netsql [EMAIL PROTECTED] wrote: of course... I use Collections (Maps and Lists) as VO/DTO. You can wrap them w/

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Rick Reumann wrote: How does a developer working on your code know how to even get the properties out of your Map? I guess he has to look at some API contract saying put date of birth in the Map as dob not dateOfBirth. As in iBatis, name of the map property is in my case the field name in

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Larry Meadors wrote: Hmm, of course, who needs things like refactoring, and compile time name and type checking? That's why you have users, eh? They'll find the bugs eventually. ;-) Larry Get/Set, Get/Set Half the time I have no idea what the db date will come back as. Look, I think

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Frank W. Zammetti
It's ironic to me that I had this same discussion with someone at work just last week :) I *was* in the Maps are better camp until a few months back when I changed my mind, and it comes down to one thing: Self-documenting code is better. A bean is self-documenting in that you can

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 3:25 PM: Rick Reumann wrote: How does a developer working on your code know how to even get the properties out of your Map? I guess he has to look at some API contract saying put date of birth in the Map as dob not dateOfBirth. As in iBatis, name of

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Frank W. Zammetti wrote the following on 7/11/2005 3:48 PM: A bean is self-documenting in that you can immediately tell what its attributes are and what types they are. I'm not even talking about generating javadoc from the source either, but that's certainly a very nice by-product. amen:)

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Martin Gainty
the layout of the domain model on the server- Original Message - From: Rick Reumann [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, July 11, 2005 2:56 PM Subject: Re: Using struts forms as Value Objects: your opinion? netsql wrote the following on 7/11

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Frank W. Zammetti
Rick Reumann wrote: But also remember it's not just about how nice it is to find out the types and names of the properties. Using Maps can introduce a lot of hidden bugs that are difficult to track down (mentioned just a few in last e-mail) Ditto :) (That's my Patrick Swayze moment for the

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 3:36 PM: Most of the sucessfull p-langs are dynamic. In flash, array and map are same class even. I envy their sucess. For example, the home page of Spring is done in Plone. Vic, I love you man, but coming back with what Flash or some other

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: A bean is self-documenting in that you can immediately tell what its attributes are and what types they are. I'm not even talking about generating javadoc from the source either, but that's certainly a very nice by-product. If I could

[FRIDAY] Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Frank W. Zammetti wrote the following on 7/11/2005 4:00 PM: Ditto :) (That's my Patrick Swayze moment for the day) awhhh shucks, I thought you were a Rush Ditto-head for a moment:) See I labeled this thread [FRIDAY] - I didn't want the sruts-list users police showing up (just messin

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Rick Reumann wrote: They have to look at a database model in order to figure out how to get back a dateOfBirth field? Yup. Each develolper has a 24 poster of the data model. DBA is in charge, Model Driven. Just like client server days. Now they want to iterate over this list and display

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 4:20 PM: Realy Rick, please try Groovy... it's the answer that's looking for you. I am sure you have read some of the Rails press. Actually, Groovy is one of the things I do want to take a look at. Hopefully one of these days I'll get to it:) --

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Rick Reumann wrote: Call me stupid but I don't even know what p-langs are (languages I can urinate on?:) lol. PHP (Friendster tried J2EE, went to PHP). Part of LAMP stack, conisdered most effective. Try Tiki-Wiki or Drupal when you get a project, you are 80% done. Python (used by

RE: Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Durham David R Jr Ctr 805 CSPTS/SCE
W/ a Map: - you don't have VO/DTO classes, but still have layer, 0 code, 0 bugs - It's dynamic, when DAO SQL string changes... so does your jxTable/Displaytag. I removed an entire layer and still have the layer. Developers are so pasionate... that's what makes them good. I'm with you on

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Frank W. Zammetti
Yeah, that's a fair point, it is a bit more documenting than it probably could be... then again, all modern IDEs will do it for you, right? And I even have my UltraEdit macros to do it. Still, fair point. Having not looked into it very much, does annotations in 1.5 help at all in this

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
I don't see how enabling BO/VO to read stringified data makes them dependant on Struts packages. On 7/8/05, Bill Schneider [EMAIL PROTECTED] wrote: Well put. To expand on #2, it's good to confine dependencies on the org.apache.struts packages to the presentation layer, and not build a Struts

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Laurie Harper
Michael Jouravlev wrote: On 7/7/05, Laurie Harper [EMAIL PROTECTED] wrote: Is not it easier to have one nested VO/BO with string properties, than to copy properties back and forth from action form to VO? I use web framework only to expose my real objects to the outer world. If you don't

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Craig McClanahan
On 7/11/05, Laurie Harper [EMAIL PROTECTED] wrote: Most of my validation is handled by the Validator framework right now which, admitedly, ties things to Struts to some extent (though there's no reason I couldn't pull Validator 'down' a level and use it under some other presentation

Re: Using struts forms as Value Objects: your opinion? BeanUtil C onverter

2005-07-11 Thread Nitish Kumar
List Subject: Re: Using struts forms as Value Objects: your opinion? Borislav Sabev wrote the following on 7/11/2005 1:37 PM: In case of the Integer there is pre-load default value and EVEN if conversion fails during the population phase, it just use is the dafault value (and you think it's

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
missing something here? Thanks Rivka -Original Message- From: Borislav Sabev [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 7:38 PM To: Struts Users Mailing List Subject: Re: Using struts forms as Value Objects: your opinion? Nitish Kumar wrote: I think raghavendra is right

RE: Using struts forms as Value Objects: your opinion?

2005-07-10 Thread Rivka Shisman
with that? Rivka -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 1:33 AM To: Struts Users Mailing List Subject: Re: Using struts forms as Value Objects: your opinion? An alternative would be to have your form class extend your value object

Re: Using struts forms as Value Objects: your opinion?

2005-07-10 Thread Wendy Smoak
From: Rivka Shisman [EMAIL PROTECTED] I have recently started working with struts and my forms contain int, short, boolean and so on, and it works fine. So far... but what happens when you display a text field asking for an integer, and your user types 'ABC'? It may not be a problem in

Re: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Laurie Harper
Vincent wrote: I'm currently designing and developping an enterprise J2EE application based on Struts. In this application there's a layer of Data Access Object which abstract the underlying persistent storage. For populating my struts' *Form I've imagined first a transfert between forms and

RE: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Daniel Perry
1) form beans generally should consist of String data to facilitate round-tripping of invalid inputs. I like to constrain them to a clearly defined role of marshaling data 'into' and 'out of' the presentation layer, i.e. across the boundary between presentation and application. This i would

Re: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Ted Husted
On 7/8/05, Laurie Harper [EMAIL PROTECTED] wrote: Personally I prefer to keep form beans and value objects seperate, for two key reasons: +1 == me too. -T. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Bill Schneider
Well put. To expand on #2, it's good to confine dependencies on the org.apache.struts packages to the presentation layer, and not build a Struts dependency into business logic. Personally I prefer to keep form beans and value objects seperate, for two key reasons: 1) form beans generally

Re: Using struts forms as Value Objects: your opinion?

2005-07-08 Thread Craig McClanahan
On 7/7/05, Laurie Harper [EMAIL PROTECTED] wrote: Vincent wrote: What do you thing about using forms as VO? Do you think it's a dirty solution? Forms are often mirrors of the database's table. Personally I prefer to keep form beans and value objects seperate, for two key reasons: +1

Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Vincent
Hi, I'm currently designing and developping an enterprise J2EE application based on Struts. In this application there's a layer of Data Access Object which abstract the underlying persistent storage. For populating my struts' *Form I've imagined first a transfert between forms and DAO based

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Leon Rosenberg
:[EMAIL PROTECTED] Im Auftrag von Vincent Gesendet: Freitag, 8. Juli 2005 01:15 An: user@struts.apache.org Betreff: Using struts forms as Value Objects: your opinion? Hi, I'm currently designing and developping an enterprise J2EE application based on Struts. In this application there's

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Leon Rosenberg
:[EMAIL PROTECTED] Im Auftrag von Vincent Gesendet: Freitag, 8. Juli 2005 01:15 An: user@struts.apache.org Betreff: Using struts forms as Value Objects: your opinion? Hi, I'm currently designing and developping an enterprise J2EE application based on Struts. In this application there's

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread erikweber
@struts.apache.org Subject: Using struts forms as Value Objects: your opinion? Hi, I'm currently designing and developping an enterprise J2EE application based on Struts. In this application there's a layer of Data Access Object which abstract the underlying persistent storage. For populating my struts' *Form

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread erikweber
want. You can go a step further and create value object classes based on database metadata . . . Erik -Original Message- From: [EMAIL PROTECTED] Sent: Jul 7, 2005 7:33 PM To: Struts Users Mailing List user@struts.apache.org Subject: Re: Using struts forms as Value Objects: your opinion

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Michael Jouravlev
On 7/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: An alternative would be to have your form class extend your value object class. However, this approach doesn't work for me. My form class fields are always Strings (because of HTTP), while my value object fields are whatever types make

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Larry Meadors
I usually build my ActionForm classes with the VO on it as a property. The String properties can be just refered to as bean.property on the jsp. Any non-string properties I map to the bean in the action form, with the translation - so if there is a date, for instance, the property on the action

Fw: Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread erikweber
: Jul 7, 2005 8:16 PM To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Subject: Re: Using struts forms as Value Objects: your opinion? On 7/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: An alternative would be to have your form class extend your value object class. However

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Hubert Rabago
Vincent, Before you go this route, check out FormDef plugin first. http://formdef.dev.java.net It will register Struts forms based on your VOs. There are several reasons why you shouldn't use VOs as your form beans and vice versa (as other msgs in this thread explain). FormDef would allow you

Re: Using struts forms as Value Objects: your opinion?

2005-07-07 Thread Rick Reumann
Hubert Rabago wrote the following on 7/8/2005 12:24 AM: There are several reasons why you shouldn't use VOs as your form beans and vice versa (as other msgs in this thread explain). Actually in this thread so far I haven't heard anyone explain why they are a 'bad' idea. The only way I see