- This topic has 1 reply, 2 voices, and was last updated 19 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
Peter L. BergholdMemberI hope I’m overlooking something obvious here, but here is the problem.
I am writing a web application in using Struts and Hibernate together. Some of the application’s input forms are going to change depending on the contents
of a couple of tables within the database.
I’ve been reading up on nested forms and was going to implement my solution using that methodology and realized there were some obstacles.The actual form (excerpt below) is going to look in part like this:
Call Name Jump Height {class name #1} {day 1} {day 2} {day n} {class name #2} {day 1} {day 2} {day n} [ text input] [select] [select] [check] [check] [check] [select] [check] [check] [check]
To fully explain what is happening here: depending on how many days a dog show is and what classes are being offered (class name) the appearance
of this form is going to change. That information is contained in a series of databae tablesOne of the thoughts I had to make this work was to create a singleton called “DataManager” and keep the dog show information in there and then I realized
that won’t work because if another user is using the applicaiton the singleton behavior is such that the two sessions will step all over each other. (at leasn that is
my understanding of what will happen).Is there a way for a FormBean to get session and/or request information for its current session/requst instnace? Is there some other way to give a FormBean some sort of contextual awareness?
Riyad KallaMemberMoving to OT > Soft Dev.
Peter,
Your form’s validate and reset methods are both passed your HttpServletRequest, which gives you access to all application scopes, so to answer your question “yes, it’s passed in”. -
AuthorPosts