A ByteEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Form Bindable implicits for ByteEnum
Path Bindable implicits for ByteEnum
Query Bindable implicits for ByteEnum
A CharEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
A CharEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
See IntPlayEnum for example usage.
Form Bindable implicits for CharEnum
Path Bindable implicits for CharEnum
Query Bindable implicits for CharEnum
An IntEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
An IntEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
Example:
scala> import enumeratum.values._ scala> import play.api.data.Form scala> import play.api.libs.json._ scala> sealed abstract class Greeting(val value:Int) extends IntEnumEntry scala> object Greeting extends IntPlayEnum[Greeting] { | val values = findValues | case object Hello extends Greeting(1) | case object GoodBye extends Greeting(2) | case object Hi extends Greeting(3) | case object Bye extends Greeting(4) | } scala> val form = Form("greeting" -> Greeting.formField) scala> form.bind(Map("greeting" -> "1")).value res0: Option[Greeting] = Some(Hello)
scala> Json.toJson(Greeting.Hello) res1: JsValue = 1
Form Bindable implicits for IntEnum
Path Bindable implicits for IntEnum
Query Bindable implicits for IntEnum
A LongEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
A LongEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
See IntPlayEnum for example usage.
Form Bindable implicits for LongEnum
Path Bindable implicits for LongEnum
Query Bindable implicits for LongEnum
Created by Lloyd on 4/13/16.
Created by Lloyd on 4/13/16.
Copyright 2016
Created by Lloyd on 4/13/16.
Created by Lloyd on 4/13/16.
Copyright 2016
Created by Lloyd on 4/13/16.
Created by Lloyd on 4/13/16.
Copyright 2016
A ShortEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
A ShortEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
See IntPlayEnum for example usage.
Form Bindable implicits for ShortEnum
Path Bindable implicits for ShortEnum
Query Bindable implicits for ShortEnum
A StringEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
A StringEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
See IntPlayEnum for example usage.
Form Bindable implicits for StringEnum
Path Bindable implicits for StringEnum
Query Bindable implicits for StringEnum
Created by Lloyd on 4/13/16.
Created by Lloyd on 4/13/16.
Copyright 2016
Created by Lloyd on 4/13/16.
Created by Lloyd on 4/13/16.
Copyright 2016
A ByteEnum that has a lot of the Play-related implicits built-in so you can avoid boilerplate.
Things included are:
Form("hello" -> MyEnum.formField)
See IntPlayEnum for example usage.