Package com.onec.ui
Record Class ActionResult
java.lang.Object
java.lang.Record
com.onec.ui.ActionResult
- Record Components:
message- a toast to show (success), ornull- anonec://url to route to afterwards, ornullrefresh- whether to reload the current list/detail surface
What the client does after a server-side action runs: optionally show a message, navigate to a
route, and/or refresh the current surface. Returned by an
ActionSpec handler.-
Constructor Summary
ConstructorsConstructorDescriptionActionResult(String message, String navigate, boolean refresh) Creates an instance of aActionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.static ActionResultShow a success toast.navigate()Returns the value of thenavigaterecord component.static ActionResultRoute to a destination (e.g.static ActionResultok()Did nothing observable — just acknowledge.static ActionResultSend the top-level browser to an externalurl(a full-page navigation, not a new tab) — e.g.booleanrefresh()Returns the value of therefreshrecord component.static ActionResultShow a toast and reload the current surface (the common "it changed data" case).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
ok
Did nothing observable — just acknowledge. -
message
Show a success toast. -
refresh
Show a toast and reload the current surface (the common "it changed data" case). -
redirect
Send the top-level browser to an externalurl(a full-page navigation, not a new tab) — e.g. kicking off an OAuth "Connect with X" consent screen so the provider can redirect back. The url is passed verbatim after theonec://redirect/scheme, so it may carry a query string. -
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 '=='. -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
refresh
public boolean refresh()Returns the value of therefreshrecord component.- Returns:
- the value of the
refreshrecord component
-