Record Class InputUrlFormElement
java.lang.Object
java.lang.Record
io.micronaut.views.fields.elements.InputUrlFormElement
- Record Components:
name- Name of the form control. Submitted with the form as part of a name/value pairid- It defines an identifier (ID) which must be unique in the whole documentplaceholder- The placeholder attribute is a string that provides a brief hint to the user as to what kind of information is expected in the field.required- If true indicates that the user must specify a value for the input before the owning form can be submitted.readOnly- A Boolean attribute which, if present, means this field cannot be edited by the user.maxLength- The maximum string length that the user can enter into the text input.minLength- The minimum string length that the user can enter into the text input.pattern- The pattern attribute, when specified, is a regular expression that the input's value must match for the value to pass constraint validation.size- The size attribute is a numeric value indicating how many characters wide the input field should be.value- input url valuelabel- the input labelerrors- errors associated with this input
- All Implemented Interfaces:
FormElementAttributes,GlobalAttributes,InputFormElement,InputStringFormElement,FormElement
@Introspected(builder=@IntrospectionBuilder(builderClass=Builder.class))
public record InputUrlFormElement(@NonNull String name, @Nullable String id, @Nullable String placeholder, boolean required, boolean readOnly, @Nullable Number maxLength, @Nullable Number minLength, @Nullable String pattern, @Nullable Integer size, @Nullable String value, @Nullable Message label, @NonNull List<Message> errors)
extends Record
implements InputFormElement, GlobalAttributes, FormElementAttributes, InputStringFormElement
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInput URL Builder. -
Constructor Summary
ConstructorsConstructorDescriptionInputUrlFormElement(@NonNull String name, @Nullable String id, @Nullable String placeholder, boolean required, boolean readOnly, @Nullable Number maxLength, @Nullable Number minLength, @Nullable String pattern, @Nullable Integer size, @Nullable String value, @Nullable Message label, @NonNull List<Message> errors) Creates an instance of aInputUrlFormElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull InputUrlFormElement.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.@NonNull InputTypegetType()final inthashCode()Returns a hash code value for this object.@Nullable Stringid()Returns the value of theidrecord component.@Nullable Messagelabel()Returns the value of thelabelrecord component.@Nullable NumberReturns the value of themaxLengthrecord component.@Nullable NumberReturns the value of theminLengthrecord component.@NonNull Stringname()Returns the value of thenamerecord component.@Nullable Stringpattern()Returns the value of thepatternrecord component.@Nullable StringReturns the value of theplaceholderrecord component.booleanreadOnly()Returns the value of thereadOnlyrecord component.booleanrequired()Returns the value of therequiredrecord component.@Nullable Integersize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringvalue()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.views.fields.elements.FormElementAttributes
hasErrorsMethods inherited from interface io.micronaut.views.fields.elements.InputFormElement
getTag
-
Constructor Details
-
InputUrlFormElement
public InputUrlFormElement(@NonNull @NonNull String name, @Nullable @Nullable String id, @Nullable @Nullable String placeholder, boolean required, boolean readOnly, @Nullable @Nullable Number maxLength, @Nullable @Nullable Number minLength, @Nullable @Nullable String pattern, @Nullable @Nullable Integer size, @Nullable @Nullable String value, @Nullable @Nullable Message label, @NonNull @NonNull List<Message> errors) Creates an instance of aInputUrlFormElementrecord class.- Parameters:
name- the value for thenamerecord componentid- the value for theidrecord componentplaceholder- the value for theplaceholderrecord componentrequired- the value for therequiredrecord componentreadOnly- the value for thereadOnlyrecord componentmaxLength- the value for themaxLengthrecord componentminLength- the value for theminLengthrecord componentpattern- the value for thepatternrecord componentsize- the value for thesizerecord componentvalue- the value for thevaluerecord componentlabel- the value for thelabelrecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceInputFormElement- Returns:
- Value of the type attribute of an input tag
-
builder
- Returns:
- the Input Url FormElement Builder
-
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 '=='. -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceFormElementAttributes- Returns:
- the value of the
namerecord component
-
id
Returns the value of theidrecord component.- Specified by:
idin interfaceGlobalAttributes- Specified by:
idin interfaceInputStringFormElement- Returns:
- the value of the
idrecord component
-
placeholder
Returns the value of theplaceholderrecord component.- Specified by:
placeholderin interfaceInputStringFormElement- Returns:
- the value of the
placeholderrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Specified by:
requiredin interfaceGlobalAttributes- Specified by:
requiredin interfaceInputStringFormElement- Returns:
- the value of the
requiredrecord component
-
readOnly
public boolean readOnly()Returns the value of thereadOnlyrecord component.- Specified by:
readOnlyin interfaceInputStringFormElement- Returns:
- the value of the
readOnlyrecord component
-
maxLength
Returns the value of themaxLengthrecord component.- Specified by:
maxLengthin interfaceInputStringFormElement- Returns:
- the value of the
maxLengthrecord component
-
minLength
Returns the value of theminLengthrecord component.- Specified by:
minLengthin interfaceInputStringFormElement- Returns:
- the value of the
minLengthrecord component
-
pattern
Returns the value of thepatternrecord component.- Specified by:
patternin interfaceInputStringFormElement- Returns:
- the value of the
patternrecord component
-
size
Returns the value of thesizerecord component.- Specified by:
sizein interfaceInputStringFormElement- Returns:
- the value of the
sizerecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceInputStringFormElement- Returns:
- the value of the
valuerecord component
-
label
Returns the value of thelabelrecord component.- Specified by:
labelin interfaceFormElementAttributes- Returns:
- the value of the
labelrecord component
-
errors
Returns the value of theerrorsrecord component.- Specified by:
errorsin interfaceFormElementAttributes- Returns:
- the value of the
errorsrecord component
-