Re: Best Practice for Holding Data Across Requests

2002-06-05 Thread Roy Truelove

> (A) pass a Map in as the parameter from the link on the first JSP
containing
> the id and name

I vote for A.  There are 100 different philosophies on how to handle this,
but mine is to put as much as you can in the URL query string.  This way you
won't have problems with people bookmarking it, or maybe having serveral
copies of the page going at once.

-Roy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Best Practice for Holding Data Across Requests

2002-06-05 Thread Mark Nichols

All -

My application has a client search facility. By entering some demographic
information case workers are able to search for clients already in the
database. The results of this search are displayed in a tabular format using
the pager tag. The form-bean has these properties:

id
firstName
lastName
address
city
ssn
birthdate

On the "results" JSP everything except id is displayed. The combination of
first name and last name form a link to an action which queries the database
for all the details for that client. This action takes as a parameter the id
associated from the selected row on the JSP. The result set from this
details query has these attributes:

id
caseNumber
caseStatus
payeeType
ebtNumber
cases (a collection of caseInfo)
etc...

The "details" JSP that displays the detail information needs to show the
client name, along with the detailed information. However the detail query
doesn't return the name, therefore I need to carry the name information
matching the selected row on the first JSP.

Is it better to:

(A) pass a Map in as the parameter from the link on the first JSP containing
the id and name

or

(B) hold the id, name pairs in a session bean so that the details action can
fill in the name before forwarding to the details JSP

or

(C) some other method I haven't thought of...



All comments, insults, and ideas accepted.

TIA,

mark n.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: