New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms - add support for IndexedSeq and Vector bindings #8721

Merged
merged 1 commit into from Oct 23, 2018

Conversation

Projects
None yet
3 participants
@guilhebl
Copy link
Contributor

guilhebl commented Oct 23, 2018

This introduces default bindings for IndexedSeq and Vector collection types.
In Play 2.6 the default Form bindings for repeated elements are: seq, list and set. However there are many use cases where Vector collection type is preferable due to its overall performance (such as for RandomAccess) if compared to List, it’s also considered one of the most popular and versatile collections in Scala. This change introduces a default binding for Vector and IndexedSeq in play.api.data.Forms as these types are not yet supported.

Pull request provided in response to lightbend discussion:
https://discuss.lightbend.com/t/feature-request-default-binding-for-vector-or-indexedseq-in-play-api-data-forms/2423
Tests added to existing test class: playframework/framework/src/play/src/test/scala/play/api/data/FormSpec.scala

@marcospereira
Copy link
Member

marcospereira left a comment

👍

Thank you, @guilhebl.

@marcospereira marcospereira merged commit a0b0a8b into playframework:2.6.x Oct 23, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details
@mkurz

This comment has been minimized.

Copy link
Member

mkurz commented Oct 23, 2018

Forward port needed?

@guilhebl

This comment has been minimized.

Copy link
Contributor

guilhebl commented Oct 24, 2018

thanks @marcospereira . @mkurz Please let me know if you see anything missing. 👍

@guilhebl guilhebl deleted the guilhebl:forms-indexed-seq-vector branch Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment