{"action":"created","issue":{"url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/50","repository_url":"https://api.github.com/repos/adrianhurt/play-bootstrap","labels_url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/50/comments","events_url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/50/events","html_url":"https://github.com/adrianhurt/play-bootstrap/issues/50","id":134938711,"number":50,"title":"PlayJava version of library?","user":{"login":"achaiah","id":3967183,"avatar_url":"https://avatars.githubusercontent.com/u/3967183?v=3","gravatar_id":"","url":"https://api.github.com/users/achaiah","html_url":"https://github.com/achaiah","followers_url":"https://api.github.com/users/achaiah/followers","following_url":"https://api.github.com/users/achaiah/following{/other_user}","gists_url":"https://api.github.com/users/achaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/achaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achaiah/subscriptions","organizations_url":"https://api.github.com/users/achaiah/orgs","repos_url":"https://api.github.com/users/achaiah/repos","events_url":"https://api.github.com/users/achaiah/events{/privacy}","received_events_url":"https://api.github.com/users/achaiah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-19T18:21:17Z","updated_at":"2016-02-22T17:43:12Z","closed_at":null,"body":"Would you be able to make a copy of this library that compiles with \"enablePlugins(PlayJava)\" rather than \"enablePlugins(PlayScala)\"?  I tried it myself but I don't have enough experience with sbt to resolve all the compilation issues.\r\n\r\nThis would be very helpful to people who are creating Play java projects but are using a different build tool (e.g. gradle). Otherwise, there are compilation issues when including your library with a Java play project."},"comment":{"url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/comments/187286069","html_url":"https://github.com/adrianhurt/play-bootstrap/issues/50#issuecomment-187286069","issue_url":"https://api.github.com/repos/adrianhurt/play-bootstrap/issues/50","id":187286069,"user":{"login":"adrianhurt","id":1089650,"avatar_url":"https://avatars.githubusercontent.com/u/1089650?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhurt","html_url":"https://github.com/adrianhurt","followers_url":"https://api.github.com/users/adrianhurt/followers","following_url":"https://api.github.com/users/adrianhurt/following{/other_user}","gists_url":"https://api.github.com/users/adrianhurt/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhurt/subscriptions","organizations_url":"https://api.github.com/users/adrianhurt/orgs","repos_url":"https://api.github.com/users/adrianhurt/repos","events_url":"https://api.github.com/users/adrianhurt/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhurt/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T17:43:12Z","updated_at":"2016-02-22T17:43:12Z","body":"Ok, so I understand now this is a problem with Play Java and not for gradle, isn't it? As I told you I don't really know how Play Java works, but as far as I know, every template in Play Java takes a `play.api.i18n.Messages` thanks to [PlayMagicForJava. implicitJavaMessages](https://github.com/playframework/playframework/blob/master/framework/src/play-java/src/main/scala/play/core/TemplateMagicForJava.scala). That's why this __password form__ example doesn't need to specify explicitly any `B3FieldConstructor` nor `Messages`; they are implicitly taken from `@import b3.vertical.fieldConstructor` and `PlayMagicForJava. implicitJavaMessages`. So you can assume the constructor of `b3.password` is simply `(field: Field, args: (Symbol,Any)*)`.\r\n\r\nBut if you need to have a reference of the corresponding `play.api.i18n.Messages` for any reason. You could get it with something like (I haven't test it …):\r\n```\r\n@define(implicitly[play.api.i18n.Messages]) { msgs =>\r\n   … use here your Scala Messages …\r\n  @b3.password(f(\"password\"), '_label -> \"\")(implicitly[b3.B3FieldConstructor], msgs)\r\n}\r\n```\r\n[Check this to know a bit more](http://adrianhurt.github.io/play-bootstrap/1.0-P24-B3/mixed/#mixed-within-form).\r\n\r\nBut the magic of implicits in Scala is that you can omit them when you know they are there."}}