Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query

Status
Not open for further replies.

mid181

Programmer
Aug 8, 2003
33
0
0
US
Hi i am new to Struts .. working in struts since the last 6 mts.
I have a complicated jsp to be built using struts:
I have a tabbled header, which is somewhat like this

---header start
Vendor: -------[data to come from the db]
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z[These are hrefs]
tab1 tab2 tab3 tab4
---header end

Now when the user clicks on tab1 say for eg. a.jsp shld come up now similarly when user clicks on tab2 b.jsp should come up.
Also if the vendor drop down in the header is changes then whichever tab is active that page should be refresh.
Also if the user clicks on any of the alphabets then whichever tab is active then that tab's jsp should be refreshed to show all records begining with the alphabet clicks ..
The header portion is common i.e. it should come up for all the jsp's
Can anyone explain how i could go about this ...

TIA
mid181
 
Create a form/action pair that you can use on all pages.

Have the header be an included jsp file using the jsp include command.

Thats it really, its not such a complex interaction.

Oh, the drop down, just use javascript for that.

 
The header which i will include in the other jsp's has link of all the alphabets like A B C D E etc
do i create a form/action for this too... and if so how do i how do i populate the header form for these links . i mean which struts tag do i use for these links.
 
You can do it one of two ways.

1) Have a page for each letter of the alphabet, have your struts form/action look at the URL to determine what letter was clicked (a.jsp)

2) Have a single page for ALL of them and have the link contain a parameters argument that tells the form/action what letter was clicked (search.jsp?letter=a)

Whichever way you go just create the file by hand and include it using a jsp include tag

Either way you just have a single struts form/action pair to handle it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top