Package su.onno.ui.divkit
Record Class SurfaceDivBuilder.HeaderAction
java.lang.Object
java.lang.Record
su.onno.ui.divkit.SurfaceDivBuilder.HeaderAction
- Enclosing class:
SurfaceDivBuilder
public static record SurfaceDivBuilder.HeaderAction(String icon, String label, String tone, String url, String placement, List<Map<String,Object>> form, Map<String,Object> formDialog, boolean disabled, boolean dynamicForm)
extends Record
form (may be empty): an action-form dialog's field descriptors — the client collects
them in a modal before POSTing the action (see ActionSpec.ActionBuilder#form).
disabled renders the button greyed and inert — a custom DETAIL action whose
enabledWhen predicate failed against the loaded record (issue #255).
dynamicForm: the modal fetches its opening values from
GET /api/actions/{kind}/{name}/{key}/form before rendering (formDefaults).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandisabled()Returns the value of thedisabledrecord component.booleanReturns the value of thedynamicFormrecord component.final booleanIndicates whether some other object is "equal to" this one.form()Returns the value of theformrecord component.Returns the value of theformDialogrecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.label()Returns the value of thelabelrecord component.Returns the value of theplacementrecord component.tone()Returns the value of thetonerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
HeaderAction
public HeaderAction(String icon, String label, String tone, String url, String placement, List<Map<String, Object>> form, Map<String, Object> formDialog, boolean disabled, boolean dynamicForm) Creates an instance of aHeaderActionrecord class.- Parameters:
icon- the value for theiconrecord componentlabel- the value for thelabelrecord componenttone- the value for thetonerecord componenturl- the value for theurlrecord componentplacement- the value for theplacementrecord componentform- the value for theformrecord componentformDialog- the value for theformDialogrecord componentdisabled- the value for thedisabledrecord componentdynamicForm- the value for thedynamicFormrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
tone
Returns the value of thetonerecord component.- Returns:
- the value of the
tonerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
placement
Returns the value of theplacementrecord component.- Returns:
- the value of the
placementrecord component
-
form
Returns the value of theformrecord component.- Returns:
- the value of the
formrecord component
-
formDialog
Returns the value of theformDialogrecord component.- Returns:
- the value of the
formDialogrecord component
-
disabled
public boolean disabled()Returns the value of thedisabledrecord component.- Returns:
- the value of the
disabledrecord component
-
dynamicForm
public boolean dynamicForm()Returns the value of thedynamicFormrecord component.- Returns:
- the value of the
dynamicFormrecord component
-