Package su.onno.ui
Record Class FormFeedback
java.lang.Object
java.lang.Record
su.onno.ui.FormFeedback
public record FormFeedback(FormFeedbackSeverity severity, String field, String message)
extends Record
One message returned by a
FormValidator. A blank field targets the whole form; a field
name (including a path such as participants.employee) places the message beside that
control as well as exposing it to assistive technology.-
Constructor Summary
ConstructorsConstructorDescriptionFormFeedback(FormFeedbackSeverity severity, String field, String message) Creates an instance of aFormFeedbackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static FormFeedbackfield()Returns the value of thefieldrecord component.static FormFeedbackfinal inthashCode()Returns a hash code value for this object.static FormFeedbackmessage()Returns the value of themessagerecord component.severity()Returns the value of theseverityrecord component.final StringtoString()Returns a string representation of this record class.static FormFeedback
-
Constructor Details
-
FormFeedback
Creates an instance of aFormFeedbackrecord class.- Parameters:
severity- the value for theseverityrecord componentfield- the value for thefieldrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
error
-
warning
-
info
-
formError
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-