You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v3.0-M4 java templating doesn't appear to work if you want to reuse existing securesocial templates like provider.scala.html or main.scala.html (although most would provide their own main view), as these both require an implicit play.api.i18n.Messages object as an input. This implicit Messages var conflicts with the Java play.i18n.Messages implictMessages variable passed into templates by PlayMagicForJava. It can't be made explicit (as then the method signature in the ViewTemplates subclass conflicts with the superclass, causing a compile error). This is pretty serious issue, because Messages need to be passed to basically every view template, and with securesocial pasing them implicitly they conflict with the play framework Messages in java (also passed implicitly but through a slightly different namespace). With this issue, I can't see an obvious way to get customised views working for v3.0-M4 for Java developers. Customising views apparently works for scala, and I believe this is because play for scala uses play.i18n.Messages not play.api.i18n.Messages. Play Java automatically uses PlayMagicForJava to convert explicit and implicit vars between java and scala objects for view templates, so it's not possible to avoid this namespace / scope collision.
There must be an explicit / implicit var structure for view templates that allows customisation in both scala and java.
v3.0-M4 java templating doesn't appear to work if you want to reuse existing securesocial templates like provider.scala.html or main.scala.html (although most would provide their own main view), as these both require an implicit play.api.i18n.Messages object as an input. This implicit Messages var conflicts with the Java play.i18n.Messages implictMessages variable passed into templates by PlayMagicForJava. It can't be made explicit (as then the method signature in the ViewTemplates subclass conflicts with the superclass, causing a compile error). This is pretty serious issue, because Messages need to be passed to basically every view template, and with securesocial pasing them implicitly they conflict with the play framework Messages in java (also passed implicitly but through a slightly different namespace). With this issue, I can't see an obvious way to get customised views working for v3.0-M4 for Java developers. Customising views apparently works for scala, and I believe this is because play for scala uses play.i18n.Messages not play.api.i18n.Messages. Play Java automatically uses PlayMagicForJava to convert explicit and implicit vars between java and scala objects for view templates, so it's not possible to avoid this namespace / scope collision.
There must be an explicit / implicit var structure for view templates that allows customisation in both scala and java.
see also #464
The text was updated successfully, but these errors were encountered: