This works with on caveat. You must provide a unique identifier to the data
set that you store in the session. You pass this identifier as a hidden
field on the second page. The reason is that if a user opens multiple
windows at once, your code can easily be confused to which form has
submitted. For example, if a user completes screen 1, goes to screen 2,
realizes a dependency must be completed first, proceeds to open a new window
and proceed to screen 1 and screen 2. The first screens information is
overwritten in the session.

Tim

-----Original Message-----
From: Weaver, Scott [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 1:15 PM
To: 'Turbine Users List'
Subject: RE: turbine "best practice" for handling forms


data.getSession() returns the javax.servlet.http.HttpSession object.  Use
HttpSessions getAttribute() and setAttribute() to get and set persistant
values across multiple requests.  Alternatively, You can also store things
in the User.setTemp() and USer.getTemp().  I prefer session objects opposed
to hidden form values both from an ease-of-use and a security stand-point.

Scott

-----Original Message-----
From: Nathaniel Reed [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: turbine "best practice" for handling forms


There are a series of screens in my application that are used to
complete a task.  This is fairly typical: the data from the first screen
is parsed & stored, used by the second form, and the third step is to
perform an action using the input from the first 2 screens.

How should the data be persisted after the first screen parses the form
parameters?  Is there a session object?  Is the RunData instance
persisted for more than a single HTTP request?

Right now the second screen parses the form parameters and the template
generates another form with those values from the first screen as
"hidden" form parameters..

In my other web development work I usually persist form parameters in
the session because it's the easiest thing to do... Is this "kosher?"

Thanks
--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
[EMAIL PROTECTED]
(626) 744-5528
(626) 744-5506



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

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



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

Reply via email to