Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 17946 invoked from network); 19 May 2003 17:02:16 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 19 May 2003 17:02:16 -0000 Received: (qmail 15913 invoked by uid 97); 19 May 2003 17:04:25 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 15906 invoked from network); 19 May 2003 17:04:25 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 19 May 2003 17:04:25 -0000 Received: (qmail 14535 invoked by uid 500); 19 May 2003 17:01:22 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 14217 invoked from network); 19 May 2003 17:01:18 -0000 Received: from mxout2.netvision.net.il (194.90.9.21) by daedalus.apache.org with SMTP; 19 May 2003 17:01:18 -0000 Received: from Erez ([212.235.78.216]) by mxout2.netvision.net.il (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HF5007448LZ8K@mxout2.netvision.net.il> for struts-user@jakarta.apache.org; Mon, 19 May 2003 20:01:20 +0300 (IDT) Date: Mon, 19 May 2003 20:01:10 +0200 From: Erez Efrati Subject: RE: value objects and forms In-reply-to: <3EC909F5.10602@ptc.com> To: 'Struts Users Mailing List' Message-id: <002301c31e30$a3e62ba0$d84eebd4@Erez> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook, Build 10.0.2627 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, Having read what you already had written, I wanted to say also, that in my project, my forms are just wrappers to value objects (or DTOs), and it works very nice.=20 For instance, if I have a User entity, I also keep a UserDTO, and all the registration form is just a wrapper holding both UserDTO, and other DTO required. One limitation is that in the JSP files the tags has the nested structure planted - for instance and in my RegForm I have get/setUser() { return m_userDTO; }=20 Therefore, every movement of fields from one DTO to the other requires a change in the JSP files dealing with these fields. On the other hand, these DTO or VO are handled by the session fa=E7ade, and can be used by other presentation/logical layers other than the web.=20 -- Erez -----Original Message----- From: Erik Price [mailto:eprice@ptc.com]=20 Sent: Monday, May 19, 2003 6:45 PM To: Struts Users Mailing List Subject: Re: value objects and forms florian wrote: > basically i wonder what speaks against this: >=20 > having a formbean with a instance of the vo. all the getter and setter > calls are delegated to > the getter and setter methods in the vo. >=20 > this would allow the vo to be populated automatically and the formbean > would be just a > wrapper around it.. Good question. I don't see anything wrong with it, I'd be interested in hearing others' opinions to learn from. > the only thing i wonder about: is it allowed to to have getter and=20 > setters which dont map > directly a field of the object? does this violate the javabean spec? No, you can have bean properties that do not correspond to actual fields. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org