B
Brett Cramer
This is probably considered a common issue, but maybe our dictated
design and architecture guidelines make it a little bit unique, who
knows. And also let me preface this with the fact that I am
relatively new to Java having been a VB programmer for 10 years.
We have a JSP application that uses one main servlet to access an
Oracle 9i database. The screen we are working on has many fields for
the user to fill out, and some of the fields are populated by
performing "lookups" to the database since they represent a list of
possible values (example, a bank name is looked up and it's address
and other details are returned).
The design dictated to us was for the user to either key in a keyword
for a bank name search, or choose from a list of sub-accounts which is
populated based on an initial account selection. We wanted to do a
pop-up style window to allow this search and to display the results,
and then the user would choose one and then return to the original
calling JSP page and fill in the apropriate fields based on what they
chose in the popup. Well, we cannot use a popup because we have to
use a prebuilt Navigation object which always puts the left menu and
borders on every page called using the object. So we decided to just
forward the user to the search page, leaving the original page to do
the search. This presents a state problem since the information on
the original page must be preserved because the user is going to
eventually come back to it. I thought, no sweat, just use some
session vars right? However, the user clicks a "Search" button and it
then calls the submit for the search form. The request does not
contain the values for the original calling screen, so I can't set my
session vars at that time. I am not sure if we should try setting the
session vars in the JSP instead or not. I am one doing the servlet
stuff while another person is doing the JSP. I am not sure where to
put more of the "responsibility" of state management--JSP or servlet.
Without asking for a specific solution (because I know it's not the
best design, but we have no choice) what options do I have in
creatively and efficiently maintaining state? At the root of this
issue is basically how to perform searches on one screen and allow the
"root" screen to maintain all of its values while receiving new values
from the search the user did. I am starting to think that leaving the
root screen is not the best option, but the popup can't be used. I'm
stumped.
design and architecture guidelines make it a little bit unique, who
knows. And also let me preface this with the fact that I am
relatively new to Java having been a VB programmer for 10 years.
We have a JSP application that uses one main servlet to access an
Oracle 9i database. The screen we are working on has many fields for
the user to fill out, and some of the fields are populated by
performing "lookups" to the database since they represent a list of
possible values (example, a bank name is looked up and it's address
and other details are returned).
The design dictated to us was for the user to either key in a keyword
for a bank name search, or choose from a list of sub-accounts which is
populated based on an initial account selection. We wanted to do a
pop-up style window to allow this search and to display the results,
and then the user would choose one and then return to the original
calling JSP page and fill in the apropriate fields based on what they
chose in the popup. Well, we cannot use a popup because we have to
use a prebuilt Navigation object which always puts the left menu and
borders on every page called using the object. So we decided to just
forward the user to the search page, leaving the original page to do
the search. This presents a state problem since the information on
the original page must be preserved because the user is going to
eventually come back to it. I thought, no sweat, just use some
session vars right? However, the user clicks a "Search" button and it
then calls the submit for the search form. The request does not
contain the values for the original calling screen, so I can't set my
session vars at that time. I am not sure if we should try setting the
session vars in the JSP instead or not. I am one doing the servlet
stuff while another person is doing the JSP. I am not sure where to
put more of the "responsibility" of state management--JSP or servlet.
Without asking for a specific solution (because I know it's not the
best design, but we have no choice) what options do I have in
creatively and efficiently maintaining state? At the root of this
issue is basically how to perform searches on one screen and allow the
"root" screen to maintain all of its values while receiving new values
from the search the user did. I am starting to think that leaving the
root screen is not the best option, but the popup can't be used. I'm
stumped.