html - Playframework does not show Form tag : Scala -


I am trying to follow the game structure tutorial, which can be found in 'Localhost: 9000'.

As it says, I have edited and compiled the file, but it does not show the result that I expected

  • Then I (at that place 'alpha 'Run and run the directory)
  • Make a folder named' Model 'on' / '/ alpha / app / controllers.
  • Edit APC

      Import package controller .api._ import play.api.mvc._ import play.api.data._ import play .api.data.forms._ Import Model Extension of task object application controller {val taskForm = form ("label" -> NonEmptyText) DRF index = action {// Ok (see Html.index (your new app is ready.)) // OK (" Let's play! ") Redirect (routes.Application.Task)} DRT Tasks = Action {OK (views.html.index (Task All (), TaskForm)}} newTask = Action {root request = & gt; TaskForm.bindFromRequest.fold (Errors = & gt; BadRequest (views.html.index (Tasks. All (), Errors), Label = & gt; {Redirect Create Action (Labels) (Routes. Application Task) }}  
  • < Code> Package Model (Task) = Nil DRF (label: string) {} def delete (id: long) {}}
  • Finally, Alpha / conf / routes

      # Routes # This file defines all application routes (high priority Progressive paths first) # ~~~~ # Home page GET / controllers.Application.index # / map to static resources / property / * file controller from public folder / asset path. Asset.et (path = "/ Public ", file) # Received / Task Controller Application Text Post / Task Controller. Application. New Task Post / Tasks: ID / Delete Controller. Application. Delete Task (ID: Long)  
  • Then I took part Rptr area and create a button 'expected' button is not unlike fine form I received some messages rather than form. Below is the message.

    BaseScalaTemplate (play.api.templates.HtmlFormat$@6435477c) (taskForm ("label"))

  • I can not track it, because it was not an error, is there a clue to fix this bug? If you give a solution or clue which will be highly appreciated: D

    ========== Thank you for sharing my problem =========== === ========

    [index.scala.html]

    & gt; @ * Comment: @ (message: string) * @ @ (task: list [task], task format: form [string]) @import helper._ & gt; & Gt; @main ("Todo List") {& gt; & Gt; & Lt; H1 & gt; @ Task.size Work (s) & lt; / H1> & Gt; & Gt; & Lt; Ul & gt; & Gt; @ Task.map {task = & gt; & Gt; & Lt; Li & gt; & Gt; @ Task.label & gt; & Gt; @ Format (route application.delete task (task.id)) {& gt; & Lt; Input type = "submit" value = "delete" & gt; & Gt; } & Gt; & Lt; / Li & gt; & Gt; } & Lt; / Ul & gt; & Gt; & Gt; & Lt; H2 & gt; Add a new task & lt; / H2 & gt; & Gt; & Gt; @date format (routes.nutsk) {& gt; @InputText (taskform ("label") & gt; & Lt; Input type = "submit" value = "create" & gt; }}

    I got the error It's really frustrating :-( Input and parameter The middle is a white spot.

    It should be:

      @inputText (taskForm ("label")) - - Change to - & gt; @InputText (taskform ( "Label"))  

    However, thanks for help: D


    Comments

    Popular posts from this blog

    ios - How do I use CFArrayRef in Swift? -

    eclipse plugin - Run java code error: Workspace is closed -

    c - Error on building source code in VC 6 -