Package com.onec.ui
Class ActionSpec.ActionBuilder
java.lang.Object
com.onec.ui.ActionSpec.ActionBuilder
- Enclosing class:
ActionSpec
Fluent builder for one action; setters may be called in any order.
-
Method Summary
Modifier and TypeMethodDescriptionenabledWhen(Predicate<ActionRow> enabled) Enable this row action only on rows where the predicate holds — disabled (greyed) elsewhere.handler(Function<ActionContext, ActionResult> handler) Run arbitrary server logic when clicked.A kebab-case lucide icon name (e.g.Pick the icon per row (ActionScope.ROWactions) — e.g.Pick the label per row (ActionScope.ROWactions).An image URL or app-static path shown instead of the lucideicon(String)— e.g.Route the client tourlwhen clicked ({id}is filled with the record id).scope(ActionScope scope) visibleWhen(Predicate<ActionRow> visible) Show this row action only on rows where the predicate holds (ActionScope.ROWactions).
-
Method Details
-
label
-
icon
A kebab-case lucide icon name (e.g."archive","download"). -
logo
An image URL or app-static path shown instead of the lucideicon(String)— e.g. a brand logo for a "Connect with X" button (.logo("https://cdn/github.svg")). -
scope
-
handler
Run arbitrary server logic when clicked. -
icon
Pick the icon per row (ActionScope.ROWactions) — e.g.playvspauseby the row's state. Overrides the fixedicon(String)on rows it resolves. -
label
Pick the label per row (ActionScope.ROWactions). Overrides the fixedlabel(String). -
visibleWhen
Show this row action only on rows where the predicate holds (ActionScope.ROWactions). -
enabledWhen
Enable this row action only on rows where the predicate holds — disabled (greyed) elsewhere.
-