1

Play フレームワークと Scala を使用して基本的なアプリケーションを構築しようとしています。提供されているフォームの例からコピーしようとしましたが、行き詰まりました。

ブラウザで更新すると、次のエラーが表示されます。

ここに画像の説明を入力

私はサンプルのすべてのファイルを調べましたが、問題がどこにあるのかうまくいかないようです。私はこれに非常に慣れていないため、理由はおそらく非常に単純ですが、今回は Google が私を失望させたのではないかと心配しています.

誰かが私を正しい方向に向けることができれば、私はとても感謝しています.

ありがとう

メインファイルのコード

/コントローラー/提出物

object Submission extends Controller {


  val contactForm:Form[Contact] = Form(

    mapping(
      "title" -> text,
      "firstname" -> text,
      "lastname" -> text,
      "gender" -> text,
      "dob" -> text,
      "mobile" -> text,
      "landline" -> text,
      "email" -> text,
      "housenumber1" -> text,
      "housename1" -> text,
      "address11" -> text,
      "address12" -> text,
      "address13" -> text,
      "address14" -> text,
      "address15" -> text,
      "postcode1" -> text,
      "country1" -> text  )

    )

        def submit = TODO

/モデル/連絡先

package models

case class Contact(
  title: String,
  firstname: String,
  lastname: String,
  gender: String,
  dob: String,
  mobile: String,
  landline: String,
  email: String,
  housenumber1: String,
  housename1: String,
  address11: String,
  address12: String,
  address13: String,
  address14: String,
  address15: String,
  postcode1: String,
  country1: String
                    )

/views/application.scala.html

@(contactForm: Form[Contact])

@import helper._
@import helper.twitterBootstrap._

@title = {Overseas Application}

@main(title) {

        @helper.form(action = routes.Submission.submit) {

            <fieldset>
                <legend>Personal Information</legend>

                @inputText(contactForm("title"),'_label -> "Title")
                @inputText(contactForm("firstname"),'_label -> "First Name")
                @inputText(contactForm("lastname"),'_label -> "Last Name")
                @inputText(contactForm("gender"),'_label -> "Gender")
                @inputText(contactForm("dob"),'_label -> "Date of Birth")
                @inputText(contactForm("mobile"),'_label -> "Mobile")
                @inputText(contactForm("landline"),'_label -> "Landline")
                @inputText(contactForm("email"),'_label -> "Email")
            </fieldset>
            <fieldset>
                <legend>Address 1</legend>
                @inputText(contactForm("housenumber1"),'_label -> "House Number (1)")
                @inputText(contactForm("housename1"),'_label -> "House Name(1)")
                @inputText(contactForm("address11"),'_label -> "Address Line 1 (1)")
                @inputText(contactForm("address12"),'_label -> "Address Line 2 (1)")
                @inputText(contactForm("address13"),'_label -> "Address Line 3 (1)")
                @inputText(contactForm("address14"),'_label -> "Address Line 4 (1)")
                @inputText(contactForm("address15"),'_label -> "Address Line 5 (1)")
                @inputText(contactForm("postcode1"),'_label -> "Postcode (1)")
                @inputText(contactForm("country1"),'_label -> "Country (1)")
            </fieldset>

        <div class="actions">
            <input type="submit" class="btn primary" value="Submit">
        </div>

   }

}
4

1 に答える 1