playframework - Play Framework Forms Type Mismatch When Upgrading to 2.4 -


when upgrading play framework 2.3.6 2.4.8, runtime error request first page.

type mismatch; found   : play.api.data.form[controllers.account.passworddata] required: play.data.form[controllers.account.passworddata] 

related line in controller:

import play.api.data._  ...  ok(html.account.changepassword(passwordform, "change password", user)) 

and line in view (password.scala.html):

@(passwordform: form[controllers.account.passworddata], title: string, user: user)(implicit flash: play.api.mvc.flash) 

now seems play uses play.data.form when import use term form in view.

what best way of fixing this? should hardcode play.api.data.form view? or change form object in account.scala play.data.form?

and difference between play.api.data.form , play.data.form?

thank you!

solved it. had accidentally configured play use java api. in java api form class play.data.form in scala api play.api.data.form.

it done in build.sbt configuration on line:

lazy val root = (project in file(".")).enableplugins(playscala, playebean) 

Comments