Created
December 6, 2013 14:13
-
-
Save raphw/7824600 to your computer and use it in GitHub Desktop.
Ajax-enhanced tabbed panel in Twitter bootstrap style for Wicket.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<wicket:panel xmlns:wicket="http://wicket.apache.org"> | |
<div class="tabbable tabs-left" style="margin-right: 0; border-right: 0;"> | |
<ul class="nav nav-tabs" style="margin-right: 0; border-right: 0;" wicket:id="tabs-container"> | |
<li wicket:id="tabs"> | |
<a data-toggle="tab" href="#" wicket:id="link"><span wicket:id="title">[tab title]</span></a> | |
</li> | |
</ul> | |
<div class="tab-content" style="min-height: 100%; padding-left: 20px; border-left: 1px solid #ddd;"> | |
<div wicket:id="panel" class="tab-pane active">[tab]</div> | |
</div> | |
</div> | |
</wicket:panel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel; | |
import org.apache.wicket.extensions.markup.html.tabs.ITab; | |
import org.apache.wicket.model.IModel; | |
import java.util.List; | |
public class AjaxTwitterBootstrapTabbedPanel<T extends ITab> extends AjaxTabbedPanel<T> { | |
public AjaxTwitterBootstrapTabbedPanel(String id, List<T> tabs) { | |
super(id, tabs); | |
} | |
public AjaxTwitterBootstrapTabbedPanel(String id, List<T> tabs, IModel<Integer> model) { | |
super(id, tabs, model); | |
} | |
@Override | |
protected String getSelectedTabCssClass() { | |
return "active"; | |
} | |
@Override | |
protected String getTabContainerCssClass() { | |
return "nav nav-tabs"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment