Field

io.eezo.http.Field
See theField companion class
object Field

Attributes

Companion
class
Source
Field.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Field.type

Members list

Value members

Concrete methods

def apply[X](using f: Field[X]): Field[X]

Attributes

Source
Field.scala
def of[X](tpe: String)(write: X => String)(parse: String => Either[String, X]): Field[X]

Builds an instance from the three members that always differ. The reading becomes a Parser known only to this Field, so writing a Field never puts a given Parser in anybody's scope.

Builds an instance from the three members that always differ. The reading becomes a Parser known only to this Field, so writing a Field never puts a given Parser in anybody's scope.

Attributes

Source
Field.scala

Givens

Givens

given given_Field_Boolean: Field[Boolean]

A checkbox, read through Checkbox rather than the core Boolean.

A checkbox, read through Checkbox rather than the core Boolean.

It shows as true or false, the value rather than the wire. A ticked box submits on, but that is the input's text and not the model's, and showing it put on in every index row and left a false cell blank (#142).

Attributes

Source
Field.scala
given given_Field_Double: Field[Double]

Attributes

Source
Field.scala
given given_Field_Id: [T] => Field[Id[T]]

A model's key.

A model's key.

A key is never rendered into a form (see Form), but it is still read through its own Field, and so through core's Parser for it, which is what keeps one reading of it rather than two.

Attributes

Source
Field.scala

Attributes

Source
Field.scala
given given_Field_Int: Field[Int]

Attributes

Source
Field.scala

Attributes

Source
Field.scala
given given_Field_Long: Field[Long]

Attributes

Source
Field.scala
given given_Field_Option: [X] => Field[X] => Field[Option[X]]

An optional field. Empty text and an absent key are the same thing to a browser, so both are None here, and neither can ever be "is required".

An optional field. Empty text and an absent key are the same thing to a browser, so both are None here, and neither can ever be "is required".

Lifted from the inner Field's own Parser, not from a Parser[X] summoned here. A summoned one would read an optional checkbox strictly and refuse its on, and would not exist at all for a type whose Field was written with Field.of.

Attributes

Source
Field.scala
given given_Field_String: Field[String]

Attributes

Source
Field.scala

Attributes

Source
Field.scala