JAVA Apache Wicket Tabs Setup

The ShieldUI Tabs Apache Wicket component offers streamlined setup and deployment of our libraries.

Since it is a wrapper of our JavaScript Tabs component, you need to include the references to the CSS and JavaScript resources in the HEAD section of your webpage:

<!DOCTYPE html>
<html>
<head>
<title>ShieldUI TreeView</title>
<meta charset="utf-8" />

<link rel="stylesheet" type="text/css" href="css/light/all.min.css" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/shieldui-all.min.js"></script>

</head>
<body>

<div wicket:id="tabs">
    <ul>
        <li>One</li>
        <li>Two</li>
    </ul>
    <div>Tab Pane 1</div> 
    <div>Tab Pane 2</div>
</div>

</body>
</html>

Then init the component and add it to your wicket page like in the following example:

final Tabs tabs = new Tabs("tabs");
add(tabs);
        
tabs.getOptions()
    .setEvents(new HashMap() {{
        put(TabsOptions.Event.ACTIVATE, new JsonFunction("function(e) { console.log('activated tab ' + e.index); }"));
    }});

To see more information on this wrapper, please refer to the following startup guide.