Extend the Wicket class you want like the AjaxTabbedPanel in Java (Model and 
Controller) and change the HTML (viewer) as you please.

You would need access to Wicket’s source code thus if you use Maven see the 
sources classifier at:
 http://maven.apache.org/pom.html

Perhaps your IDE (Eclipse, Netbeans, IntelliJ IDEA, etc) is already configured 
to view the sources of your project’s dependencies.
If not download the sources manually from maven central or view the source code 
in the right branch online at GitHub:
https://github.com/apache/wicket/tree/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs

Note the TabbedPanel.html contents:
<wicket:panel xmlns:wicket="http://wicket.apache.org";>
<div wicket:id="tabs-container" class="tab-row">
<ul>
        <li wicket:id="tabs"><a href="#" wicket:id="link"><span 
wicket:id="title">[[tab title]]</span></a></li>
</ul>
</div>
<div wicket:id="panel" class="tab-panel"><!-- no panel --></div>
</wicket:panel>

So create your own VerticalTabbedPanel.html and change the HTML mark-up to say 
a table but preserve the wicket:id hierarchy:
<html xmlns:wicket="http://wicket.apache.org";>
    <wicket:panel>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr valign="top">
            <td valign="top" nowrap="nowrap">
                <div wicket:id="tabs-container" class="tab-row">
                    <ul>
                        <li wicket:id="tabs">
                            <a href="#" wicket:id="link"><span 
wicket:id="title">[[tab title]]</span></a>
                        </li>
                    </ul>
                </div>
            </td>
            <td>&nbsp;</td>
            <td valign="top" width="100%">
                <div wicket:id="panel" class="tab-panel">[panel]</div>
            </td>
        </tr>
    </table>
    </wicket:panel>
</html>

Then you need to extend the AjaxTabbedPanel java class to your own 
VerticalTabbedPanel.java say:
public class VerticalTabbedPanel extends TabbedPanel {
    // In your own VerticalTabbedPanel constructors call super.*
}

From then on, feel free to use your new VerticalTabbedPanel.

Alternately you can use CSS to style the original markup of the 
TabbedPanel.html to be vertical which might be an easier solution as earlier 
suggested.
I only provided this answer to you so you can learn how easy it is to override 
Wicket’s code and its markup if so desired.

On Jun 9, 2014, at 10:34 AM, Tim Collins <tcoll...@greatergood.com> wrote:

> I am rather new to wicket and am trying to do something that ought to be 
> rather easy... I want to make the tabs I display show up vertically rather 
> than horizontally.
> 
> I am currently building a arraylist of tabs and then passing them to 
> AjaxTabbedPanel, but as far as I can see there is no way to make the 
> resulting tabs on a page show up down the left side of a page rather than 
> across the top... Is there an easy way to do that?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

Reply via email to