permaculture playing cards*
The moose likes Struts and the fly likes Tab support in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tab support in Struts" Watch "Tab support in Struts" New topic
Author

Tab support in Struts

Shashidahanu Iyyanar
Ranch Hand

Joined: Jun 22, 2005
Posts: 37
I want to implement a page which consists of a number of tabs(tabbed-pane structure).Is this possible in Struts or I have to use Tiles for developing the tab layout?Please reply to this as soon as possible.Thanks in advance.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
the short answer is yes, but you'll have to put some effort into leveraging what struts gives you. struts is the controller of your MVC app with selective UI element building supports (essentially custom tags).

building tabs requires passing in the correct criteria to have a particular tab highlighted while the rest are not. the criteria must be calculated and passed into the JSPs. struts has all that you need to do this MANUALLY (calculate criteria and conditional statement tags); in other words, you can write scriptlets or you can use struts action classes and custom tags to do the tabs.

you can use pre-defined tiles attribute value to set which one to highlight (instead of calculating the highlight based on an executed action), but that will be the end of what tiles will be able to help you. as for conditional statements to display the right tabs, i highly recommend using JSTL core taglib instead of the logic taglib provided by struts.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Shashidahan,

Look at struts menu project. If that's what you are looking for. Should be very easy to incorporate in your application.
http://demo.raibledesigns.com/struts-menu/index.jsp

Cheers,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tab support in Struts
 
Similar Threads
Struts layout Tabs
struts 1- create tab
How can I have a TAB inside my JSP
Please recommend a UI Control Tag Library for Struts.
Tab feature to JSP