Class 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 Detail

      • Pages

        public Pages​(String id,
                     String mainId,
                     org.jboss.elemento.IsElement element)
        Create a new instance with the main page id and element.
      • Pages

        public Pages​(String id,
                     String mainId,
                     elemental2.dom.HTMLElement element)
        Create a new instance with the main page id and element.
    • 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 id
        id - the id of the page being added
        parentTitle - the title of the parent or main page
        title - the title of the page being added
        element - 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 id
        id - the id of the page being added
        parentTitle - the title of the parent or main page
        title - the title of the page being added
        element - 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:
        element in interface org.jboss.elemento.IsElement