Record Class FormResult

java.lang.Object
java.lang.Record
com.axelor.meta.headless.FormResult
Record Components:
status - how the run ended
message - the error or refusal message, when there is one
record - the root record and its lines as the session holds them: after a save, as read back; without one, as the actions left them
saved - whether the record was saved during the session, up to now
attrs - the display attributes actions set (readonly, hidden, required, title...), by node path ("" for the root), then by widget; recorded, not enforced
messages - info, notify and error messages, in order
fieldErrors - field errors that stopped the run, by field
views - views the browser would have opened (view items), as the server sent them
files - files and reports the browser would have offered for download
hints - signals the browser would have acted on outside the form, e.g. refresh-app
writes - the records the form's actions wrote themselves, kept whatever the run did next
question - the open question when FormResult.Status.SUSPENDED

public record FormResult(FormResult.Status status, String message, Map<String,Object> record, boolean saved, Map<String,Map<String,Map<String,Object>>> attrs, List<FormResult.Message> messages, Map<String,String> fieldErrors, List<Map<String,Object>> views, List<Map<String,Object>> files, List<String> hints, List<FormResult.Write> writes, ActionAlert question) extends Record
  • Constructor Details

  • Method Details

    • toString

      public final 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public FormResult.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • record

      public Map<String,Object> record()
      Returns the value of the record record component.
      Returns:
      the value of the record record component
    • saved

      public boolean saved()
      Returns the value of the saved record component.
      Returns:
      the value of the saved record component
    • attrs

      public Map<String,Map<String,Map<String,Object>>> attrs()
      Returns the value of the attrs record component.
      Returns:
      the value of the attrs record component
    • messages

      public List<FormResult.Message> messages()
      Returns the value of the messages record component.
      Returns:
      the value of the messages record component
    • fieldErrors

      public Map<String,String> fieldErrors()
      Returns the value of the fieldErrors record component.
      Returns:
      the value of the fieldErrors record component
    • views

      public List<Map<String,Object>> views()
      Returns the value of the views record component.
      Returns:
      the value of the views record component
    • files

      public List<Map<String,Object>> files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component
    • hints

      public List<String> hints()
      Returns the value of the hints record component.
      Returns:
      the value of the hints record component
    • writes

      public List<FormResult.Write> writes()
      Returns the value of the writes record component.
      Returns:
      the value of the writes record component
    • question

      public ActionAlert question()
      Returns the value of the question record component.
      Returns:
      the value of the question record component