diff --git a/MultiLevelDropDown/src/main/java/de/beyondjava/bootsfaces/examples/Person.java b/MultiLevelDropDown/src/main/java/de/beyondjava/bootsfaces/examples/Person.java deleted file mode 100644 index 62ddd3e..0000000 --- a/MultiLevelDropDown/src/main/java/de/beyondjava/bootsfaces/examples/Person.java +++ /dev/null @@ -1,34 +0,0 @@ -package de.beyondjava.bootsfaces.examples; - -import java.util.Date; - -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -@ViewScoped -@ManagedBean -public class Person { - - private String firstName; - private String lastName; - private Date birthdate; - public Date getBirthdate() { - return birthdate; - } - public void setBirthdate(Date birthdate) { - this.birthdate = birthdate; - } - public String getLastName() { - return lastName; - } - public void setLastName(String lastName) { - this.lastName = lastName; - } - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - -} diff --git a/MultiLevelDropDown/src/main/webapp/WEB-INF/web.xml b/MultiLevelDropDown/src/main/webapp/WEB-INF/web.xml index 9fbee83..dfab479 100644 --- a/MultiLevelDropDown/src/main/webapp/WEB-INF/web.xml +++ b/MultiLevelDropDown/src/main/webapp/WEB-INF/web.xml @@ -2,20 +2,20 @@ - - javax.faces.FACELETS_DECORATORS - - de.beyondjava.angularFaces.core.tagTransformer.AngularTagDecorator - - - - primefaces.THEME - bootstrap - BootsFaces_USETHEME true + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + *.jsf + + index.jsf diff --git a/MultiLevelDropDown/src/main/webapp/bf0.7.0.xhtml b/MultiLevelDropDown/src/main/webapp/bf0.7.0.xhtml new file mode 100644 index 0000000..e7a771f --- /dev/null +++ b/MultiLevelDropDown/src/main/webapp/bf0.7.0.xhtml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + +

The interesting part of this demo is the menu bar. It contains nested menus.

+

I've found the CSS source code at http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3. It's available under the MIT license.

+
+ + + + +
+ \ No newline at end of file diff --git a/MultiLevelDropDown/src/main/webapp/dropdown-submenu.css b/MultiLevelDropDown/src/main/webapp/dropdown-submenu.css new file mode 100644 index 0000000..a8d9d02 --- /dev/null +++ b/MultiLevelDropDown/src/main/webapp/dropdown-submenu.css @@ -0,0 +1,48 @@ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #ccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #fff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} \ No newline at end of file diff --git a/MultiLevelDropDown/src/main/webapp/index.xhtml b/MultiLevelDropDown/src/main/webapp/index.xhtml index e5f4948..2ae9b1c 100644 --- a/MultiLevelDropDown/src/main/webapp/index.xhtml +++ b/MultiLevelDropDown/src/main/webapp/index.xhtml @@ -16,26 +16,33 @@ + onclick="alert('This demo shows how to implement a multi-level drop-down menu.'); return false;"> + + + + + + + - - -
- - - -
- - - -
- - - +

The interesting part of this demo is the menu bar. It contains nested menus.

+

Nested submenus work out of the box in BootsFaces 0.8.0. If you are using the predecessor version BootsFaces 0.7.0, + see the BootsFaces 0.7.0 demo.

+

I've found the CSS source code at http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3. It's available under the MIT license.