Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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:
```xml

com.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));