Package org.jboss.hal.ballroom
Class Pages
- java.lang.Object
-
- org.jboss.hal.ballroom.Pages
-
- All Implemented Interfaces:
org.jboss.elemento.IsElement
public class Pages extends Object implements org.jboss.elemento.IsElement
A structural element to manage a main and a number of nested page elements. The nested page elements provide a breadcrumb to navigate back and forth.Use this element when you need additional levels of navigation which cannot be provided by a vertical navigation.
-
-
Constructor Summary
Constructors Constructor Description Pages(String id, String mainId, elemental2.dom.HTMLElement element)Create a new instance with the main page id and element.Pages(String id, String mainId, org.jboss.elemento.IsElement element)Create a new instance with the main page id and element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPage(String parentId, String id, Supplier<String> parentTitle, Supplier<String> title, elemental2.dom.HTMLElement element)Adds a nested page.voidaddPage(String parentId, String id, Supplier<String> parentTitle, Supplier<String> title, org.jboss.elemento.IsElement element)Adds a nested page.elemental2.dom.HTMLElementelement()StringgetCurrentId()voidshowPage(String id)Shows the specified main / nested page and updates the breadcrumb.
-
-
-
Method Detail
-
addPage
public void addPage(String parentId, String id, Supplier<String> parentTitle, Supplier<String> title, org.jboss.elemento.IsElement element)
Adds a nested page.- Parameters:
parentId- the parent idid- the id of the page being addedparentTitle- the title of the parent or main pagetitle- the title of the page being addedelement- the page element
-
addPage
public void addPage(String parentId, String id, Supplier<String> parentTitle, Supplier<String> title, elemental2.dom.HTMLElement element)
Adds a nested page.- Parameters:
parentId- the parent idid- the id of the page being addedparentTitle- the title of the parent or main pagetitle- the title of the page being addedelement- the page element
-
showPage
public void showPage(String id)
Shows the specified main / nested page and updates the breadcrumb.- Parameters:
id- the page id
-
getCurrentId
public String getCurrentId()
-
element
public elemental2.dom.HTMLElement element()
- Specified by:
elementin interfaceorg.jboss.elemento.IsElement
-
-