Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ronsmits/sidenavigationpanel
A small wicket component that makes a sidebar menu with bootstrap
https://github.com/ronsmits/sidenavigationpanel
Last synced: 1 day ago
JSON representation
A small wicket component that makes a sidebar menu with bootstrap
- Host: GitHub
- URL: https://github.com/ronsmits/sidenavigationpanel
- Owner: ronsmits
- Created: 2013-01-13T17:50:11.000Z (about 12 years ago)
- Default Branch: develop
- Last Pushed: 2018-02-23T12:13:40.000Z (almost 7 years ago)
- Last Synced: 2024-11-14T08:50:16.906Z (2 months ago)
- Language: Java
- Homepage:
- Size: 106 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wicket bootstrap sidebar Navigation
I wanted a simple way of adding a sidebar menu to a wicket application where I use Bootstrap css.
## Including in your project
As this is not released into maven central there are two ways to use this in your project### compile
Clone this repository and run the command:
````
mvn clean install
````
This will install the jar and the pom in your local repository.### Use jitpack
Add the jitpack repo to your pom file:
```xml
jitpack.io
https://jitpack.io
```
Add the dependency:
```xmlcom.github.ronsmits
sidenavigationpanel
release~3.0.0-SNAPSHOT```
## Using
SideNavigationPanel uses a Builder to add MenuItems to it:add(new SideNavigationPanel(new SideNavigationPanel.Builder("navigation", getPage()).
.addMenuItem("List", ListPage.class)
.addMenuItem("Add", AddPage.class)
.addMenuItem("Another Page", AnotherPage.class)));the markup is
or
The html coming from this is a div containing an unordered list with the right bootstrap classes added:
The way the builder works you can also add stuff like this:
Builder builder = new Builder("navigation", getPage());
builder = builder
.addMenuItem("Home", HomePage.class)
.addMenuItem("List", ListPage.class);
if (checkLogin()) {
builder.addMenuItem("Add", AddFilm.class);
}
add(new SideNavigationPanel(builder));