I guess I was just not thinking of people doing things the way you describe. Heck, I can design a disaster lots of ways. One way is the way you describe, viz. to violate the basic premises of the MVC pattern as used in web applications, i.e. have the data mining for the request view put into the session model. I could not personally imagine why someone would want to put a form for a view into session scope. One could really screw things up and put it into application scope.

At 07:35 PM 2/13/2004, Andrew Hill wrote:
Your not thinking very hard about it obviously.

Have a think about this scenario then (which is a common problem I and
others have had to deal with before):

User is presented with a table of records containing links to edit
individual records.
Clicking on the link opens the form for that record in a new window (or
maybe it doesnt and the user chooses 'open in new window' themself from the
context menu). This is because the user often needs to be working on lots of
such records at the same time.

Now let us assume that the ActionForm for the record editing form needs to
go in session scope (nb: in request scope there is not a problem so if the
design can be done practically with request scope that is much better).

During the course of working with these records the browser is going to be
making several trips back to the server to refresh that record. (Maybe it
has several select boxes depending on each others value, or it pretends to
do tabpanes or is some kind of wizard or whatever).

Remember now that the user has several different such records open in
different windows. Different record instances but same type of record - and
record form - and record action (we are talking about the same ActionMapping
here obviously).

Have a think about whats going to be happening with that session scoped
action form...




-----Original Message----- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Saturday, 14 February 2004 07:25 To: Struts Users Mailing List Subject: RE: [OT] - Request against Session


That is correct, but these situations do not, so far as I can see, cause problems.


At 01:50 PM 2/13/2004, you wrote: >Actually, it's not two different sessions if the second window was opened >from the first with a popup or a crtl-n or "open in new window". > > >-----Original Message----- >From: Michael McGrady [mailto:[EMAIL PROTECTED] >Sent: Friday, February 13, 2004 2:30 PM >To: Struts Users Mailing List >Subject: RE: [OT] - Request against Session > >At 08:41 AM 2/13/2004, you wrote: > >My interpretation of that comment was that if a user has two windows open > >and are going back and forth between the windows, the system may use > >information from one window to update the information in the session that > >actually relates to the old window. This would be a pretty poor design, >but > >it's the only interpretation I can guess. > >If there are two windows, there should be two sessions, and that should be >okay. Right? > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to