Interface WithIdentifier<E extends Element,B extends TypedBuilder<E,B>>

Type Parameters:
E - the type of the element
B - the type of the builder used to build the element
All Superinterfaces:
IsElement<E>, TypedBuilder<E,B>
All Known Implementing Classes:
AccordionItem, ActionListItem, Alert, BreadcrumbItem, Cell, Chip, DataListItem, DescriptionListGroup, ExpandableNavigationGroup, JumpLinksItem, Label, ListItem, MenuItem, MenuItemAction, NavigationGroup, NavigationItem, SimpleListItem, Tab, Td, Th, ToggleGroupItem, ToolbarItem, Tr, TreeViewItem

public interface WithIdentifier<E extends Element,B extends TypedBuilder<E,B>> extends TypedBuilder<E,B>, IsElement<E>
The WithId interface represents a (sub)component that has an ID. It is normally implemented by subcomponents of components implementing HasItems.

It's up to the implementation what to do with the ID. The recommendation is to set it as data attribute using Dataset.identifier and not set it on the root element as Element.id. This guarantees that you can still use an arbitrary element ID.

The factory methods of the (sub)component implementing this interface should take the identifier as the first argument.

  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from interface org.jboss.elemento.IsElement

    element

    Methods inherited from interface org.jboss.elemento.TypedBuilder

    that
  • Method Details

    • identifier

      String identifier()