Hi,
I'm just getting back into Struts after a few years away from web
programming. I've got a question about methods for updating only
certain members of an object.
I've got a struts action that creates, updates and deletes a User
object. When updating though, I have two different jsp pages that
--- On Mon, 9/29/08, Bobby Politte wrote:
> I've got a struts action that creates, updates and deletes a User
> object. When updating though, I have two different jsp pages that
> update only part of the object (user information on one, and password
> on the other). Unexpectedly (at least to me),
hi,
One way I can think of is to use hidden fields in your forms, to pass
long the values you do not want changed. This way you keep your
Model-driven action consistent and you pass along the parameters that
you do not want the user to change in each use-case.
A not so clean way would be to
hi again,
According to what Dave explains then my recommendation does not apply.
Maybe you should check what values you are initializing the User DTO
model to, maybe some of the fields are initialized as null or maybe you
think you are updating but Struts is actually creating a new DTO object.
ember 2008 16:44
To: user@struts.apache.org
Subject: Struts 2 CRUD Question
Hi,
I'm just getting back into Struts after a few years away from web
programming. I've got a question about methods for updating only
certain members of an object.
I've got a struts action that creates, u
--- On Thu, 10/9/08, Gawain Hammond wrote:
> Does struts create a new object for every submit? And under
> what circumstance would it not?
Actions are created per-request, thus action variables are as well. Options
include retrieving a session object manually, using ScopedModelDriven, a
conversa
; From: Dave Newton [mailto:[EMAIL PROTECTED]
> Sent: 09 October 2008 17:20
> To: Struts Users Mailing List
> Subject: RE: Struts 2 CRUD Question
>
> --- On Thu, 10/9/08, Gawain Hammond wrote:
> > Does struts create a new object for every submit? And under
> > what circumstan
om: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: 09 October 2008 17:20
To: Struts Users Mailing List
Subject: RE: Struts 2 CRUD Question
--- On Thu, 10/9/08, Gawain Hammond wrote:
Does struts create a new object for every submit? And under
what circumstance would it not?
Actions are created per-requ
--- On Fri, 10/10/08, Alberto Flores <[EMAIL PROTECTED]> wrote:
> Don't you mean scope="request" and not "prototype"?
No, "prototype" is the correct scope for action beans.
Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
So, from the Spring documentation:
prototype: Scopes a single bean definition to any number of object
instances.
request: Scopes a single bean definition to the lifecycle of a single
HTTP request; that is each and every HTTP request will have its own
instance of a bean created off the back o
long shot, but I'm stumped. I've not written any custom
interceptors or anything, it's all pretty bog standard actions and
struts forms.
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: 09 October 2008 17:20
To: Struts Users Mailing List
Subject: R
--- On Fri, 10/10/08, Alberto Flores wrote:
> prototype: Scopes a single bean definition to any number of
> object instances.
>
> request: Scopes a single bean definition to the lifecycle
> of a single HTTP request; that is each and every HTTP request
> will have its own instance of a bean create
12 matches
Mail list logo