On This Page
A directory-like presentation for a menu.
- Fluent
- Declarative
Directory.builder()
.menu(List.of(
Menu.builder()
.label("Invoices")
.submenu(List.of(
RouteLink.builder()
.label("Page 1")
.build(),
RouteLink.builder()
.label("Page 2")
.build()
))
.build(),
Menu.builder()
.label("Payments")
.submenu(List.of(
RouteLink.builder()
.label("Page 1")
.build(),
RouteLink.builder()
.label("Page 2")
.build()
))
.build()
))
.build()
TBD
Available properties
This is the list of available properties for a directory:
| Property | Description | Notes |
|---|---|---|
| id | id for this component | |
| cssClasses | list of css classes | content of the css attribute |
| style | inline style attributes | content of the style attribute |
| menu | list of menu options, as Actionables |
And here is the list of classes implementing the Actionable interface, and their properties.
Common properties for all Actionables
These properties are common to all the menu options
| Property | Description | Notes |
|---|---|---|
| label | text to show. Only if no component is supplied | |
| selected | if this options must appear as checked | |
| component | any component to be displayed instead of label | |
| className | any css class name | |
| disabled | if this option must appear as disabled | |
| disabledOnClick | if this option must be disabled on click | |
| itemData | any object. It will travel back to the backend, if this option is selected |
RouteLink
Use it for taking the user to a concrete route
| Property | Description | Notes |
|---|---|---|
| route | route to navigate to | |
| target | any of Top, Parent |
MenuSeparator
The divider has no properties. Just draws an horizontal line.
Menu
| Property | Description | Notes |
|---|---|---|
| submenu | a list of Actionables (the menu options) |
ContentLink
| Property | Description | Notes |
|---|---|---|
| componentSupplier | a component supplier |