You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Beer <pa...@backsoft.com> on 2001/07/09 22:54:55 UTC
struts w/ej
i have followed some old threads about this but see no resolution to how to
map the struts form bean to EJB value objects; they all seem to allude to a
mysterious an non-existent struts 1.1. is it recommended to do validation
from within the form bean and then create a value object w/the data for the
EJB or to do the validation in the value object? Seems like duplicate work
to create a form bean and a value object for an ejb, but if you dont , then
the html form is dangerously coupled with the functioning of the EJB which I
am trying to avoid in my application design. Can people give some real
world examples of this ? And on a technical note, if you use the struts
form bean to instantiate and populate a value object how is it passes to the
action? are people just putting it in the http session ? sample code would
be helpful.
-paul
Re: struts w/ej
Posted by Dmitri Colebatch <di...@nuix.com.au>.
I'm not sure when other ppl do but I create a form bean which takes the value
object in the constructor and delegates. That way its easy to update the
bean with a bulk setter.
cheers
dim
On Tue, 10 Jul 2001 06:54, Paul Beer wrote:
> i have followed some old threads about this but see no resolution to how to
> map the struts form bean to EJB value objects; they all seem to allude to a
> mysterious an non-existent struts 1.1. is it recommended to do validation
> from within the form bean and then create a value object w/the data for the
> EJB or to do the validation in the value object? Seems like duplicate work
> to create a form bean and a value object for an ejb, but if you dont , then
> the html form is dangerously coupled with the functioning of the EJB which
> I am trying to avoid in my application design. Can people give some real
> world examples of this ? And on a technical note, if you use the struts
> form bean to instantiate and populate a value object how is it passes to
> the action? are people just putting it in the http session ? sample code
> would be helpful.
>
> -paul
----------------------------------------
Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description:
----------------------------------------