This package and its children contain classes used for the custom Tab Component
To make content 'tabbable' you need to do the following :-
Usually it is fine to just have your Form bean for the page in question implement this class.
public class MyTabbedForm extends CoreForm implements TabModel { /* * The usual getters, setters and other form methods go here */ public int getTabCount() { return 3; } public String getTabName(int idx) { switch(idx) { case 0: return "general"; case 1: return "contactDetails"; case 2: return "custom"; } } public String getSelectedTab() { return selectedTab; } public void setSelectedTab(String selectedTab) { this.selectedTab = selectedTab; } public String getTabTitle(int idx) { /* Only the third tab returns a fixed tab title, the first * two come from resources */ if(idx == 2) { return "Additional"; } return null; } }
To render the tabs first make sure you import the appropriate tab library. Then there are three tags that need to be provided :-
<%@ taglib uri="/sslexplorer/taglibs/tabs" prefix="tabs" %> <div id="page_myTabbedForm" class="tabbedForm"> <explorer:form method="post" action="/showMyTabbedFrom.do""> <html:hidden property="referer"/> <html:hidden property="actionTarget"/> <html:hidden property="_charset_"/> <tabs:tabSet name="myTabbedForm" bundle="myBundle" resourcePrefix="myTabs.tab"> <tabs:tabHeadings/> <tabs:tab tabName="general"> .. Some content </tabs:tab> <tabs:tab tabName="contactDetails"> .. Some content </tabs:tab> <tabs:tab tabName="customer"> .. Some content </tabs:tab> </tabs:tabSet> </explorer:form> </div>
Note the tabbedForm style ID that is used in the surrounding DIV and the bundle and resourcePrefix attributes which are used to get the actual tab title.
myTabs.tab.general.title=General Options myTabs.tab.contactDetails.title=Email Addresses