JavaScript is disabled on your browser.
play.data

Class Form.Field

  • Enclosing class:
    Form<T>


    public static class Form.Field
    extends java.lang.Object
    A form field.
    • Constructor Summary

      Constructors
      Constructor and Description
      Form.Field (Form<?> form, java.lang.String name, java.util.List<F.Tuple<java.lang.String,java.util.List<java.lang.Object>>> constraints, F.Tuple<java.lang.String,java.util.List<java.lang.Object>> format, java.util.List<ValidationError> errors, java.lang.String value)
      Creates a form field.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      java.util.List<F.Tuple<java.lang.String,java.util.List<java.lang.Object>>> constraints ()
      Returns all the constraints associated with this field.
      java.util.List<ValidationError> errors ()
      Returns all the errors associated with this field.
      F.Tuple<java.lang.String,java.util.List<java.lang.Object>> format ()
      Returns the expected format for this field.
      java.util.List<java.lang.Integer> indexes ()
      Return the indexes available for this field (for repeated fields ad List)
      java.lang.String name ()
      Returns the field name.
      Form.Field sub (java.lang.String key)
      Get a sub-field, with a key relative to the current field.
      java.lang.String toString ()
      java.lang.String value ()
      Returns the field value, if defined.
      java.lang.String valueOr (java.lang.String or)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Form.Field

        public Form.Field(Form<?> form,
         java.lang.String name,
         java.util.List<F.Tuple<java.lang.String,java.util.List<java.lang.Object>>> constraints,
         F.Tuple<java.lang.String,java.util.List<java.lang.Object>> format,
         java.util.List<ValidationError> errors,
         java.lang.String value)
        Creates a form field.
        Parameters:
        name - the field name
        constraints - the constraints associated with the field
        format - the format expected for this field
        errors - the errors associated with this field
        value - the field value ,if any
    • Method Detail

      • name

        public java.lang.String name()
        Returns the field name.
        Returns:
        The field name.
      • value

        public java.lang.String value()
        Returns the field value, if defined.
        Returns:
        The field value, if defined.
      • valueOr

        public java.lang.String valueOr(java.lang.String or)
      • errors

        public java.util.List<ValidationError> errors()
        Returns all the errors associated with this field.
        Returns:
        The errors associated with this field.
      • constraints

        public java.util.List<F.Tuple<java.lang.String,java.util.List<java.lang.Object>>> constraints()
        Returns all the constraints associated with this field.
        Returns:
        The constraints associated with this field.
      • format

        public F.Tuple<java.lang.String,java.util.List<java.lang.Object>> format()
        Returns the expected format for this field.
        Returns:
        The expected format for this field.
      • indexes

        public java.util.List<java.lang.Integer> indexes()
        Return the indexes available for this field (for repeated fields ad List)
      • sub

        public Form.Field sub(java.lang.String key)
        Get a sub-field, with a key relative to the current field.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

AltStyle によって変換されたページ (->オリジナル) /