struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: [Newbie] Where to put Model Access whenever Action class is not an option?
Date Thu, 29 Aug 2002 11:25:49 GMT
A general strategy would be to have a "set up" action which populates your
form or
retrieves data and places it in the appropriate scope and then forwards to
the page.

For example: If I want to display a page which allows a user to edit their
account, I would
have a showEdit action to prepare the page (retrieve existing user account
info, populate
the form) and then an edit action to save any changes.

HTH,

robert


> -----Original Message-----
> From: Rademacher Tobias [mailto:Tobias.Rademacher@grob.de]
> Sent: Thursday, August 29, 2002 1:15 AM
> To: 'struts-user@jakarta.apache.org'
> Subject: [Newbie] Where to put Model Access whenever Action class is not
> an option?
>
>
> Hi Folks,
>
> first of all I'm a newbie to Struts. As far as I can see it's a great
> framework. Thx for that a lot.
>
> My Problem is that my JSP-Views needs some inital data from the models.
> Consider some <select>-boxes given the
> user a chance make their choices....
>
> Where can I init the FromBeans that are use to share data between Action
> class/View? The constructor of
> the class? As far as I understand the Struts delegates form View to Action
> using the FormBean and ActionMappings.
> So Action is always the end of the request chain  (view
> ---o-action(controler)-o-model). Correct?
> So I need something like that: model -----O controler O----- view.
>
> As far as I can see the Struts HTML/Logic TLs offering
> java.util.Collection
> processing. So my idea is build an
> Taglib that can access the Model (EJB's with finder methods returning
> collection or Local interfaces).
> Is this okay, or is there a better solution?
>
> Any help is appreciated. :-)
>
> Gruß
>
> Toby
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message