After receiving the update "Ambiguous Implicit Values" Error
I am trying to update my playback app to version 2.3.
I wrote my own html helper:
@(field: play.api.data.Field, options: Seq[(String,String)], args: (Symbol,Any)*)(implicit handler: views.html.helper.FieldConstructor, lang: play.api.i18n.Lang)
@input(field, args:_*) { (id, name, value, htmlArgs) =>
@options.map { v =>
<label class="radio inline">
<input type="radio" id="@(id)_@v._1" name="@name" value="@v._1" @(if(value == Some(v._1)) "checked" else "") @toHtmlArgs(htmlArgs)> <span>@v._2</span>
</label>
}
}
The error I am getting:
both implicitJavaLang methods on PlayMagicForJava object of type => play.api.i18n.Lang and lang value of type play.api.i18n.Lang match expected type play.api.i18n.Lang ambiguous implicit values
I do not understand what the problem is. To remove the implicit language is not an option for me in some html helpers. Also I don't want lang to be a "real" parameter. I want to take advantage of implicits.
Is there a solution for this?
Any help would be great :)
Thank you in advance
+3
source to share
2 answers