Products
About Guided Tour Online Demo Trial Version Requirements
Resources
Documents Configuration examples TagLib Reference Useful Links
Customer Support
Updates Forums Contact Services
Sales
Licensing Sales FAQ Buy Online
 
 
 
buy online   |   about us   |   german version  

» 4. Configuration of the Tabset within the JSP-Page

In order to use the TabSet-Tag on a JSP page, the corresponding tag library must be declared at the start of the page. Then, the Common-Controls can be used with the prefix <ctrl:tagname />. [In addition, the incorporation of the tag libraries must be included in the Deployment descriptor, the WEB-INF/web.xml file].


<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/cc-controls.tld" prefix="ctrl" %>

<html:form action="/sample402/userprofilEdit" method="post">

    <ctrl:tabset
        id="uptabset"
        property="tabset"
        tabs="3"
        labellength="20"
        width="450"
        runat="client">

        <ctrl:tab
            id="tab1"
            title="User"
            content="Tab_Page1.jsp"
            tooltip="User Display"/>

        <ctrl:tab
            id="tab2"
            title="Settings"
            content="Tab_Page2.jsp"
            tooltip="User Settings"/>

        <ctrl:tab
            id="tab3"
            title="History"
            content="Tab_Page3.jsp"
            tooltip="History"/>
    </ctrl:tabset>

</html:form>

In our example, for the sake of clarity, we have included the individual tabs as independent JSP-pages. The details source code is available with the demo-version.

Alternatively, the HTML-code can also be specified directly within the tag-body of a tab:

    <ctrl:tab   id="tab3"   title="History" tooltip="History"/>
        <b>Hello World!</b>
    </ctrl:tab>

back   |   continue

Impressum | This product includes software developed by the Java Apache Project
Tours
ListControl TreeControl TreeListControl TabSetControl Form Tags MenuControl Print version Live Demo Configuration