I want to upgrade my Java application to Play 2.6.12. In the form edit page I have got following code:
<legend>Student ( @studentForm("name").value() )</legend> <input type="hidden" value="@studentForm("id").value()" name="id" />
to display name of the object and pass the DB object ID.
SBT shell during compilation of this code complains:
[warn] C:\dev\app1\app\views\details.scala.html:10:44: method value in class Field is deprecated: see corresponding Javadoc for more information. [warn] <legend>Student ( @studentForm("name").value() )</legend>
I have browsed the Javadocs: https://www.playframework.com/documentation/2.6.x/api/scala/index.html#play.api.data.Form@value:Option[T] however value() does not appear to be deprecated.
Should I bother with this warning or just ignore it?
Is it possible to use method vauleOrElse here in any way?
BTW: I consider passing DB id to client side a bit dangerous as it can be modified. Is it possible to pass identity of the existing Ebeans object to be updated in the form in more secure manner?