Package su.onno.ui
Record Class ActionResult
java.lang.Object
java.lang.Record
su.onno.ui.ActionResult
Typed feedback and refresh intent returned by an
ActionSpec server handler.
Navigation belongs on the declaration itself via ActionSpec.ActionBuilder.navigate(String).-
Constructor Summary
ConstructorsConstructorDescriptionActionResult(boolean refresh, ActionFeedback feedback) Creates an instance of aActionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionResultdialog(ActionDialog dialog) Show a successful informational/warning acknowledgement dialog.final booleanIndicates whether some other object is "equal to" this one.feedback()Returns the value of thefeedbackrecord component.static ActionResultfeedback(ActionFeedback feedback) Show typed feedback without navigation or refresh.final inthashCode()Returns a hash code value for this object.static ActionResultok()Did nothing observable — just acknowledge.booleanrefresh()Returns the value of therefreshrecord component.static ActionResultrefresh(ActionDialog dialog) Reload the current surface and show an acknowledgement dialog.static ActionResultrefresh(ActionToast toast) Reload the current surface and show a structured toast.static ActionResultreload()Reload the current surface without showing feedback.static ActionResulttoast(ActionToast toast) Show a structured toast with an explicit tone, heading, explanation, and optional details.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActionResult
Creates an instance of aActionResultrecord class.- Parameters:
refresh- the value for therefreshrecord componentfeedback- the value for thefeedbackrecord component
-
-
Method Details
-
ok
Did nothing observable — just acknowledge. -
reload
Reload the current surface without showing feedback. -
feedback
Show typed feedback without navigation or refresh. -
dialog
Show a successful informational/warning acknowledgement dialog. -
toast
Show a structured toast with an explicit tone, heading, explanation, and optional details. -
refresh
Reload the current surface and show a structured toast. -
refresh
Reload the current surface and show an acknowledgement dialog. -
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 '=='. -
refresh
public boolean refresh()Returns the value of therefreshrecord component.- Returns:
- the value of the
refreshrecord component
-
feedback
Returns the value of thefeedbackrecord component.- Returns:
- the value of the
feedbackrecord component
-