Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't customize the view propose by the module securesocial for play2, "not found: type RequestHeader "
    primarykey
    data
    text
    <p>I'm trying to customize the view propose by the module "securesocial" with play 2</p> <p>What I've already done is :</p> <p>1/ Create a new plugin name SecureViewsPlugin that implements the TemplatesPlugin under "controllers/SecuresViewsPlugin.scala"</p> <pre><code>package controllers import play.api.mvc.{RequestHeader, Request} import play.api.templates.Html import securesocial.controllers.Registration.RegistrationInfo import securesocial.controllers.TemplatesPlugin import securesocial.core.{SecuredRequest, SocialUser} import play.api.data.Form import securesocial.core.SecureSocial._ import securesocial.controllers.PasswordChange.ChangeInfo class SecureViewsPlugin(application: App) extends TemplatesPlugin { override def getLoginPage[A](implicit request: Request[A], form: Form[(String, String)], msg: Option[String] = None): Html = { views.html.secure.login(form, msg) } override def getSignUpPage[A](implicit request: Request[A], form: Form[RegistrationInfo], token: String): Html = { views.html.secure.Registration.signUp(form, token) } </code></pre> <p>(..)</p> <p>2/ I updated the file play.plugins with :</p> <pre><code>1500:com.typesafe.plugin.CommonsMailerPlugin 9996:securesocial.core.providers.utils.DefaultPasswordValidator 9997:controllers.SecureViewsPlugin </code></pre> <p>3/ I made a copy a the different view in the folder "views/secure"</p> <pre><code>/Views /secure /inputFieldConstructor.scala.html /login.scala.html /(...) </code></pre> <p>Here is the begining of the error I always get</p> <pre><code>not found: type RequestHeader In app/views/secure/login.scala.html at line 0. -&gt;@(loginForm: Form[(String,String)], errorMsg: Option[String] = None)(implicit request: RequestHeader) [error] /Users/clementaubert/Desktop/demo/target/scala-2.9.1/src_managed/main/views/html/secure/login.template.scala:24: not found: type RequestHeader [error] object login extends BaseScalaTemplate[play.api.templates.Html,Format[play.api.templates.Html]](play.api.templates.HtmlFormat) with play.api.templates.Template3[Form[scala.Tuple2[String, String]],Option[String],RequestHeader,play.api.templates.Html] { [error] ^ [error] /Users/clementaubert/Desktop/demo/target/scala-2.9.1/src_managed/main/views/html/secure/login.template.scala:27: not found: type RequestHeader [error] def apply/*1.2*/(loginForm: Form[(String,String)], errorMsg: Option[String] = None)(implicit request: RequestHeader):play.api.templates.Html = { [error] ^ [error] /Users/clementaubert/Desktop/demo/app/controllers/SecureViewsPlugin.scala:18: type mismatch; [error] found : play.api.data.Form[(String, String)] [error] required: play.data.Form[(java.lang.String, java.lang.String)] [error] views.html.secure.login(form, msg) [error] login.scala.html </code></pre> <p>I tried to delete "(implicit request: RequestHeader)" but then I got this error</p> <pre><code>type mismatch; found : play.api.data.Form[(String, String)] required: play.data.Form[(java.lang.String, java.lang.String)] </code></pre> <p>I'm guessing I'm not doing it the right way.</p> <p>I can't figure out why I'm getting these errors</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload