This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tabs in JSP and passing values between tabs

 
Mark Henryson
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am doing one project with JSP,Servlet and Oracle DB. First I want to design a tab in JSP, not using Swing or AWT. I had searched in gogle, and got some idea. Now I am coming to my problem.
I will be having 5 tabs and each tab will have 12 to 15 text boxs. The user can fill the fields in the each tab some may be optional , when he filled all the fields in the tab and on clicking the submit button, all the values from the 5 tabs should enter into the Oracle DB.
How to achieve it without any performance hit. PLease give me some idea on it. if any of you come across soln for this with sample codings in the net, it will be useful.
I am still searching in net and reading some documents related to this.

The reason I'm posting in this forum is, this forum has many active members who can solve/given some ideas in it before.

[Bear edit: what's with the all caps?]
[ March 04, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arranging the various layers into tabs is a simple matter of HTML and CSS and has no JSP dimension to it. As such, this has been moved tothe HTML forum.
 
Mark Henryson
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I had searched in gogle, and got some idea. Now I am coming to my problem.


My problem is not with how to design tab. I already mentioned that I had got some tips for the tabs. But what my problem is, how to get the value from each tab and while submit, all the values from all the tabs should be stored in the DB.

In a normal sceneario, we can get the value from the form by using getParameter to the servlet and then store it ti the DB. But here I am having 5 tabs and each tab will have several text fields.

Supposing I am having three tabs namely, T1,T2,T3

T1 - T1 is a tab and it has a form with some text fields. I am filling the fields and after that I am going to tab T2.

T2 - T2 is an another tab with some text fields and i am filling that to & same for tab T3.

Now I am at Tab T3 with the values from the Tab T3, how can I get the values from the tabs T1 and T2. SInce I want to store is DB with all the values from tabs T1, T2 and T3. Whether we can store the values from T1 and T2 in the page scope or request scope or session scope. We don't know in which order the user is going to fill the fields in the tabs.

When the user fills the text fields in one of the tab T1 and store all the values in the session and similarly to T2 and T3 and finally submitting we can get it from the session and store it in the DB.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no reason that all of the fields on all of the tabs cannot be part of a single form that is submitted to the server when the form is submitted.

Unless there's something you're not telling us. Is there any reason that a server hit needs to be made when "switching" between tabs?
 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,

Check this out: http://webfx.eae.net/dhtml/tabpane/tabpane.html

This is a good implementation of tab panes in dhtml and it has good JavaScript API.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic